From 211e1096d0dcf7df3d7a4d00d2de82140174dabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 1 Nov 2022 20:27:10 +0100 Subject: [PATCH] Fixed Refreshing parent tags and/or timelines on raw editor save --- CHANGELOG.md | 1 + .../decompiler/flash/gui/GenericTagTreePanel.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f85947558..9e4b2edd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - Working with byte ranges - caused problems when cloning tags - All "mapped" tags have character id in parenthesis in the tag tree - Raw editor now checks whether field value can be placed inside this kind of tag +- Refreshing parent tags and/or timelines on raw editor save ## [16.0.1] - 2022-10-31 ### Added diff --git a/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java b/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java index 966cc579b..bab2b1ba2 100644 --- a/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/GenericTagTreePanel.java @@ -31,6 +31,9 @@ import com.jpexs.decompiler.flash.gui.tagtree.AbstractTagTree; import com.jpexs.decompiler.flash.gui.tagtree.TagTree; import com.jpexs.decompiler.flash.tags.Tag; import com.jpexs.decompiler.flash.tags.base.ASMSource; +import com.jpexs.decompiler.flash.tags.base.CharacterIdTag; +import com.jpexs.decompiler.flash.tags.base.CharacterTag; +import com.jpexs.decompiler.flash.timeline.Timelined; import com.jpexs.decompiler.flash.types.ARGB; import com.jpexs.decompiler.flash.types.BasicType; import com.jpexs.decompiler.flash.types.CLIPACTIONRECORD; @@ -1017,6 +1020,16 @@ public class GenericTagTreePanel extends GenericTagPanel { assignTag(tag, editedTag); tag.setModified(true); tag.setSwf(swf); + if (tag instanceof Timelined) { + ((Timelined)tag).resetTimeline(); + } + //For example DefineButton and its DefineButtonCxForm + if ((tag instanceof CharacterIdTag) && (!(tag instanceof CharacterTag))) { + CharacterTag parentCharacter = swf.getCharacter(((CharacterIdTag)tag).getCharacterId()); + if (parentCharacter instanceof Timelined) { + ((Timelined)parentCharacter).resetTimeline(); + } + } return true; }