mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-program-tree-exception'
This commit is contained in:
commit
c29c6af525
1 changed files with 15 additions and 7 deletions
|
@ -274,7 +274,8 @@ public class ProgramTreePlugin extends ProgramPlugin
|
|||
for (int i = 0; i < numberOfViews; i++) {
|
||||
treeNames[i] = saveState.getString(TREE_NAME + "-" + i, null);
|
||||
}
|
||||
ArrayList<TreeViewProvider> providerList = new ArrayList<>();
|
||||
|
||||
List<TreeViewProvider> providerList = new ArrayList<>();
|
||||
for (String element : treeNames) {
|
||||
TreeViewProvider provider = providerMap.get(element);
|
||||
if (provider != null) {
|
||||
|
@ -309,11 +310,20 @@ public class ProgramTreePlugin extends ProgramPlugin
|
|||
|
||||
selectionToggleAction.setSelected(saveState.getBoolean(TOGGLE_STATE, true));
|
||||
|
||||
restoreTreeViews();
|
||||
|
||||
viewProvider.readDataState(saveState);
|
||||
}
|
||||
|
||||
private void restoreTreeViews() {
|
||||
if (currentProgram == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// At this point, all tree views have been restored. The low level components have cache
|
||||
// that needs to get updated. We want to maintain the order of the tree views so that the
|
||||
// UI does not move around on the user. Use the view names as they are stored in the
|
||||
// program to provide a consistent order.
|
||||
// Update low-level component cache. We want to maintain the order of the tree views so
|
||||
// that the UI does not move around on the user. Use the view names as they are stored in
|
||||
// the program to provide a consistent order.
|
||||
//
|
||||
List<TreeViewProvider> list = new ArrayList<>();
|
||||
String[] orderedTreeNames = currentProgram.getListing().getTreeNames();
|
||||
|
@ -323,8 +333,6 @@ public class ProgramTreePlugin extends ProgramPlugin
|
|||
}
|
||||
|
||||
viewProvider.treeViewsRestored(list);
|
||||
viewProvider.readDataState(saveState);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue