From 1211b01e25e88c8f348791514d8aac67f3e96144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 9 Jun 2025 08:56:33 +0200 Subject: [PATCH] Added: #2467 Show ImportAssets name/characterId in the title when there is only single one item --- CHANGELOG.md | 2 ++ .../jpexs/decompiler/flash/tags/ImportAssets2Tag.java | 11 +++++++++++ .../jpexs/decompiler/flash/tags/ImportAssetsTag.java | 11 +++++++++++ 3 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 097ed6b3a..929b2d086 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file. - Importing sound stream block ranges - Commandline replacing sound stream block ranges - [#1625] Error log frame - Save all to file button +- [#2467] Show ImportAssets name/characterId in the title when there is only single one item ### Changed - AS1/2 - Single DoAction tag inside frame is now displayed directly as frame node @@ -3859,6 +3860,7 @@ Major version of SWF to XML export changed to 2. [#2236]: https://www.free-decompiler.com/flash/issues/2236 [#2451]: https://www.free-decompiler.com/flash/issues/2451 [#1625]: https://www.free-decompiler.com/flash/issues/1625 +[#2467]: https://www.free-decompiler.com/flash/issues/2467 [#2456]: https://www.free-decompiler.com/flash/issues/2456 [#2459]: https://www.free-decompiler.com/flash/issues/2459 [#2460]: https://www.free-decompiler.com/flash/issues/2460 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java index 01696b453..60cb5f1a2 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssets2Tag.java @@ -84,6 +84,7 @@ public class ImportAssets2Tag extends Tag implements ImportTag { super(swf, ID, NAME, null); url = ""; tags = new ArrayList<>(); + names = new ArrayList<>(); } /** @@ -154,4 +155,14 @@ public class ImportAssets2Tag extends Tag implements ImportTag { public String getUrl() { return url; } + + @Override + public Map getNameProperties() { + Map ret = super.getNameProperties(); + if (names.size() == 1) { + ret.put("chid", "" + tags.get(0)); + ret.put("im", "" + names.get(0)); + } + return ret; + } } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java index e9e9118d6..1fe753cdd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/ImportAssetsTag.java @@ -67,6 +67,7 @@ public class ImportAssetsTag extends Tag implements ImportTag { super(swf, ID, NAME, null); url = ""; tags = new ArrayList<>(); + names = new ArrayList<>(); } @Override @@ -130,4 +131,14 @@ public class ImportAssetsTag extends Tag implements ImportTag { public String getUrl() { return url; } + + @Override + public Map getNameProperties() { + Map ret = super.getNameProperties(); + if (names.size() == 1) { + ret.put("chid", "" + tags.get(0)); + ret.put("im", "" + names.get(0)); + } + return ret; + } }