mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-28 18:46:37 +08:00
Fixed issue with GTreeModel's fireNodeChanged() method not actually
telling the tree which node changed.
This commit is contained in:
+9
-1
@@ -158,7 +158,15 @@ public class GTreeModel implements TreeModel {
|
|||||||
SystemUtilities.assertThisIsTheSwingThread(
|
SystemUtilities.assertThisIsTheSwingThread(
|
||||||
"GTreeModel.fireNodeDataChanged() must be " + "called from the AWT thread");
|
"GTreeModel.fireNodeDataChanged() must be " + "called from the AWT thread");
|
||||||
|
|
||||||
TreeModelEvent event = new TreeModelEvent(this, (TreePath) null);
|
GTreeNode viewNode = convertToViewNode(changedNode);
|
||||||
|
if (viewNode == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Note - we are passing in the treepath of the node that changed. The javadocs in
|
||||||
|
// TreemodelListener seems to imply that you need to pass in the treepath of the parent
|
||||||
|
// of the node that changed and then the indexes of the children that changed. But this
|
||||||
|
// works and is cheaper then computing the index of the node that changed.
|
||||||
|
TreeModelEvent event = new TreeModelEvent(this, viewNode.getTreePath());
|
||||||
|
|
||||||
for (TreeModelListener listener : listeners) {
|
for (TreeModelListener listener : listeners) {
|
||||||
listener.treeNodesChanged(event);
|
listener.treeNodesChanged(event);
|
||||||
|
|||||||
Reference in New Issue
Block a user