mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 11:44:36 +00:00
do not recreate tree model every time
This commit is contained in:
@@ -278,7 +278,7 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
|
||||
@Internal
|
||||
public SWFBundle bundle;
|
||||
|
||||
|
||||
@Internal
|
||||
private Timeline timeline;
|
||||
|
||||
@@ -865,6 +865,15 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
return this;
|
||||
}
|
||||
|
||||
public SWF getRootSwf() {
|
||||
SWF result = this;
|
||||
while (result.binaryData != null) {
|
||||
result = result.binaryData.getSwf();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
@@ -34,16 +34,16 @@ public class SWFList implements List<SWF>, SWFContainerItem {
|
||||
|
||||
public String name;
|
||||
|
||||
//public boolean isBundle;
|
||||
|
||||
public SWFBundle bundle;
|
||||
|
||||
//public Class bundleClass;
|
||||
|
||||
public SWFSourceInfo sourceInfo;
|
||||
|
||||
public List<SWF> swfs = new ArrayList<>();
|
||||
|
||||
public boolean isBundle() {
|
||||
return bundle != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SWF getSwf() {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
@@ -51,7 +51,7 @@ public class SWFList implements List<SWF>, SWFContainerItem {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (bundle != null) {
|
||||
if (isBundle()) {
|
||||
return name;
|
||||
} else {
|
||||
return swfs.get(0).getFileTitle();
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.treeitems;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.SWFBundle;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user