tag tree nodes refactored, faster building of tag tree, some redundant logic (export and view in gui) simplified

This commit is contained in:
honfika@gmail.com
2014-11-04 18:39:48 +01:00
parent b4aeb0f80f
commit 7a8d952107
83 changed files with 1699 additions and 2244 deletions

View File

@@ -20,7 +20,6 @@ import com.jpexs.decompiler.flash.ApplicationInfo;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.console.ContextMenuTools;
import com.jpexs.decompiler.flash.gui.treenodes.SWFNode;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import com.jpexs.helpers.Cache;
import com.sun.jna.Platform;
@@ -482,14 +481,13 @@ public class MainFrameClassicMenu implements MainFrameMenu, ActionListener {
case ACTION_SAVE: {
SWF swf = mainFrame.panel.getCurrentSwf();
if (swf != null) {
SWFNode snode = ((TagTreeModel) mainFrame.panel.tagTree.getModel()).getSwfNode(swf);
boolean saved = false;
if (snode.binaryData != null) {
if (swf.binaryData != null) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
swf.saveTo(baos);
snode.binaryData.binaryData = baos.toByteArray();
snode.binaryData.setModified(true);
swf.binaryData.binaryData = baos.toByteArray();
swf.binaryData.setModified(true);
saved = true;
} catch (IOException ex) {
Logger.getLogger(MainFrameClassicMenu.class.getName()).log(Level.SEVERE, "Cannot save SWF", ex);