diff --git a/CHANGELOG.md b/CHANGELOG.md index c2b34f208..3d2561d99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ All notable changes to this project will be documented in this file. ### Removed - [#2123] FLA export - Using shape fixer for morphshapes (needs something better) +### Changed +- [#2120] Exported assets no longer take names from assigned classes if there is more than 1 assigned class + ## [20.0.0] - 2023-11-05 ### Added - [#1130], [#1220] Remembering last used screen (monitor), @@ -3283,6 +3286,7 @@ Major version of SWF to XML export changed to 2. [#2116]: https://www.free-decompiler.com/flash/issues/2116 [#2122]: https://www.free-decompiler.com/flash/issues/2122 [#2111]: https://www.free-decompiler.com/flash/issues/2111 +[#2120]: https://www.free-decompiler.com/flash/issues/2120 [#1130]: https://www.free-decompiler.com/flash/issues/1130 [#1220]: https://www.free-decompiler.com/flash/issues/1220 [#1717]: https://www.free-decompiler.com/flash/issues/1717 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java index de4c78c39..a365971f1 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/base/CharacterTag.java @@ -62,11 +62,25 @@ public abstract class CharacterTag extends Tag implements CharacterIdTag { @Override public String getExportFileName() { String result = super.getExportFileName(); - return result + "_" + getCharacterId() + (exportName != null ? "_" + exportName : "") + (!classNames.isEmpty() ? "_" + String.join("___", classNames) : ""); + result += "_" + getCharacterId(); + if (exportName != null) { + result += "_" + exportName; + } + if (classNames.size() == 1) { + result += "_" + classNames.iterator().next(); + } + return result; } public String getCharacterExportFileName() { - return getCharacterId() + (exportName != null ? "_" + exportName : "") + (!classNames.isEmpty() ? "_" + String.join("___", classNames) : ""); + String result = "" + getCharacterId(); + if (exportName != null) { + result += "_" + exportName; + } + if (classNames.size() == 1) { + result += "_" + classNames.iterator().next(); + } + return result; } protected String exportName;