mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 04:25:21 +02:00
[233570] ClassCastException when moving filter after "go into" action
This commit is contained in:
parent
220f17bc92
commit
44f56ccd0f
1 changed files with 6 additions and 2 deletions
|
@ -3557,7 +3557,6 @@ public class SystemView extends SafeTreeViewer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ok, we have found all expanded descendants of all selected items.
|
// ok, we have found all expanded descendants of all selected items.
|
||||||
|
|
||||||
// If none of the expanded sub-nodes are remote simply use the inherited algorithm for refresh
|
// If none of the expanded sub-nodes are remote simply use the inherited algorithm for refresh
|
||||||
if (!areAnyRemote) {
|
if (!areAnyRemote) {
|
||||||
for (int idx = 0; idx < itemsToRefresh.length; idx++)
|
for (int idx = 0; idx < itemsToRefresh.length; idx++)
|
||||||
|
@ -3574,6 +3573,7 @@ public class SystemView extends SafeTreeViewer
|
||||||
TreeItem currItem = itemsToRefresh[idx];
|
TreeItem currItem = itemsToRefresh[idx];
|
||||||
setExpanded(currItem, false); // collapse node
|
setExpanded(currItem, false); // collapse node
|
||||||
ourInternalRefresh(currItem, currItem.getData(), true, true); // dispose of children, update plus
|
ourInternalRefresh(currItem, currItem.getData(), true, true); // dispose of children, update plus
|
||||||
|
|
||||||
if (wasExpanded[idx]) {
|
if (wasExpanded[idx]) {
|
||||||
createChildren(currItem); // re-expand
|
createChildren(currItem); // re-expand
|
||||||
currItem.setExpanded(true);
|
currItem.setExpanded(true);
|
||||||
|
@ -3582,6 +3582,8 @@ public class SystemView extends SafeTreeViewer
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 2. expand each previously expanded sub-node, recursively
|
// 2. expand each previously expanded sub-node, recursively
|
||||||
for (int idx = 0; idx < expandedChildren.size(); idx++) {
|
for (int idx = 0; idx < expandedChildren.size(); idx++) {
|
||||||
ExpandedItem itemToExpand = (ExpandedItem) expandedChildren.get(idx);
|
ExpandedItem itemToExpand = (ExpandedItem) expandedChildren.get(idx);
|
||||||
|
@ -3611,6 +3613,7 @@ public class SystemView extends SafeTreeViewer
|
||||||
if (debug) System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); //$NON-NLS-1$
|
if (debug) System.out.println("Re-Expanded non-remote Item: " + itemToExpand.data); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getControl().setRedraw(true);
|
getControl().setRedraw(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4026,6 +4029,7 @@ public class SystemView extends SafeTreeViewer
|
||||||
// HMMM... WE NEED TO REFRESH EVEN IF NOT EXPANDED IF ADDING FIRST CHILD
|
// HMMM... WE NEED TO REFRESH EVEN IF NOT EXPANDED IF ADDING FIRST CHILD
|
||||||
if (!add) // move or delete
|
if (!add) // move or delete
|
||||||
{
|
{
|
||||||
|
// Widgets can only be Tree or TreeItem here
|
||||||
if (parentRefItem instanceof Item){
|
if (parentRefItem instanceof Item){
|
||||||
if (!(((TreeItem) parentRefItem).getExpanded())) {
|
if (!(((TreeItem) parentRefItem).getExpanded())) {
|
||||||
refresh(parentRefItem.getData()); // flush cached widgets so next expand is fresh
|
refresh(parentRefItem.getData()); // flush cached widgets so next expand is fresh
|
||||||
|
|
Loading…
Add table
Reference in a new issue