Fixed On new SWF loading, do not expand all other SWFs nodes, only this one

This commit is contained in:
Jindra Petřík
2022-11-08 22:47:13 +01:00
parent 6925787f8f
commit 99fa794a6f
3 changed files with 46 additions and 3 deletions
@@ -590,6 +590,20 @@ public class DumpTree extends JTree {
expandPath(new TreePath(new Object[]{root, dtm.getChild(root, i)}));
}
}
public void expandSwfNode(SWF swf) {
DumpTreeModel dtm = getModel();
DumpInfo root = dtm.getRoot();
int childCount = dtm.getChildCount(root);
expandPath(new TreePath(new Object[]{root}));
for (int i = 0; i < childCount; i++) {
DumpInfoSwfNode swfNode = (DumpInfoSwfNode) dtm.getChild(root, i);
if (swfNode.getSwf() == swf) {
expandPath(new TreePath(new Object[]{root, dtm.getChild(root, i)}));
break;
}
}
}
public void setSelectedTag(Tag tag) {
ByteArrayRange range = tag.getOriginalRange();