Fixed Refreshing parent tags and/or timelines on raw editor save

This commit is contained in:
Jindra Petřík
2022-11-01 20:27:10 +01:00
parent e9a133058b
commit 211e1096d0
2 changed files with 14 additions and 0 deletions

View File

@@ -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

View File

@@ -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;
}