mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 01:20:43 +00:00
Fixed flattening switch for ABCs
This commit is contained in:
@@ -3737,7 +3737,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
if (this.openables.contains(treeItemSwf.openableList)) {
|
||||
setTagTreeSelectedNode(getCurrentTree(), treeItem);
|
||||
}
|
||||
} else {
|
||||
} else if (openable != null) {
|
||||
if (this.openables.contains(openable.getOpenableList())) {
|
||||
setTagTreeSelectedNode(getCurrentTree(), treeItem);
|
||||
}
|
||||
|
||||
@@ -350,9 +350,9 @@ public class TagListTreeModel extends AbstractTagTreeModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSwf(SWF swf) {
|
||||
public void updateOpenable(Openable openable) {
|
||||
swfHeaders.clear();
|
||||
TreePath changedPath = getTreePath(swf == null ? root : swf);
|
||||
TreePath changedPath = getTreePath(openable == null ? root : openable);
|
||||
fireTreeStructureChanged(new TreeModelEvent(this, changedPath));
|
||||
calculateCollisions();
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ public abstract class AbstractTagTree extends JTree {
|
||||
AbstractTagTreeModel ttm = getModel();
|
||||
if (ttm != null) {
|
||||
List<List<String>> expandedNodes = View.getExpandedNodes(this);
|
||||
ttm.updateSwf(null); // todo: honfika: update only the changed swfs, but there was an exception when i tried it
|
||||
ttm.updateOpenable(null); // todo: honfika: update only the changed swfs, but there was an exception when i tried it
|
||||
View.expandTreeNodes(this, expandedNodes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.timeline.Frame;
|
||||
import com.jpexs.decompiler.flash.timeline.TagScript;
|
||||
import com.jpexs.decompiler.flash.timeline.Timelined;
|
||||
import com.jpexs.decompiler.flash.treeitems.Openable;
|
||||
import com.jpexs.decompiler.flash.treeitems.TreeItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -171,7 +172,7 @@ public abstract class AbstractTagTreeModel implements TreeModel {
|
||||
public void valueForPathChanged(TreePath path, Object newValue) {
|
||||
}
|
||||
|
||||
public abstract void updateSwf(SWF swf);
|
||||
public abstract void updateOpenable(Openable openable);
|
||||
|
||||
public TreeItem getParent(TreeItem obj) {
|
||||
return (TreeItem)getTreePath(obj).getParentPath().getLastPathComponent();
|
||||
|
||||
@@ -155,10 +155,11 @@ public class TagTreeModel extends AbstractTagTreeModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSwf(SWF swf) {
|
||||
public void updateOpenable(Openable openable) {
|
||||
swfInfos.clear();
|
||||
TreePath changedPath = getTreePath(swf == null ? root : swf);
|
||||
fireTreeStructureChanged(new TreeModelEvent(this, changedPath));
|
||||
abcClassesTree.clear();
|
||||
TreePath changedPath = getTreePath(openable == null ? root : openable);
|
||||
fireTreeStructureChanged(new TreeModelEvent(this, changedPath));
|
||||
calculateCollisions();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user