tag saving fix

This commit is contained in:
2015-05-03 13:03:48 +02:00
parent 1de608207f
commit 39243bdea2
5 changed files with 19 additions and 0 deletions
@@ -120,6 +120,7 @@ public abstract class MainFrameMenu {
}
if (saved) {
swf.clearModified();
mainFrame.getPanel().refreshTree(swf);
}
return true;
@@ -56,6 +56,7 @@ import com.jpexs.decompiler.flash.tags.base.SoundStreamHeadTypeTag;
import com.jpexs.decompiler.flash.tags.base.TextTag;
import com.jpexs.decompiler.flash.tags.gfx.DefineCompactedFont;
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.TreeItem;
import com.jpexs.decompiler.flash.types.GLYPHENTRY;
@@ -1142,6 +1143,10 @@ public class PreviewPanel extends JSplitPane {
return;
}
if (item instanceof TagScript) {
item = ((TagScript) item).getTag();
}
if (item instanceof Tag) {
genericEditButton.setVisible(false);
genericSaveButton.setVisible(true);
@@ -758,6 +758,7 @@ public class ActionPanel extends JPanel implements SearchListener<ActionSearchRe
src.setActions(ASMParser.parse(0, true, text, src.getSwf().version, false));
}
src.setModified();
mainPanel.refreshTree(src.getSwf());
setSource(this.src, false);
View.showMessageDialog(this, AppStrings.translate("message.action.saved"), AppStrings.translate("dialog.message.title"), JOptionPane.INFORMATION_MESSAGE, Configuration.showCodeSavedMessage);
saveButton.setVisible(false);