From 046639937c16c00b6a352ac55d0a33e9cf55ca45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 9 May 2025 16:49:15 +0200 Subject: [PATCH] Fixed: Simple editor - adding a library item to the last frame adds a frame --- CHANGELOG.md | 1 + src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85f8cd293..0d5990d36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ All notable changes to this project will be documented in this file. - Text search was not available as context menu option for AS3 scripts folder - [#2454] SVG export - color matrix not applied to images - [PR216] ffdec.sh - Support BSD version of sed in java version checks +- Simple editor - adding a library item to the last frame adds a frame ### Removed - Option to preview flash items via ActiveX component is no longer available. diff --git a/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java b/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java index 146ffe35e..16eba63a6 100644 --- a/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java @@ -290,9 +290,11 @@ public class EasySwfPanel extends JPanel { } else { timelined.addTag(timelined.indexOfTag(showFrameTag), place); - RemoveObject2Tag remove = new RemoveObject2Tag(timelined.getSwf()); - remove.depth = newDepth; - timelined.addTag(timelined.indexOfTag(showFrameTag) + 1, remove); + if (fframe < timelined.getFrameCount() - 1) { + RemoveObject2Tag remove = new RemoveObject2Tag(timelined.getSwf()); + remove.depth = newDepth; + timelined.addTag(timelined.indexOfTag(showFrameTag) + 1, remove); + } } DefineBeforeUsageFixer fixer = new DefineBeforeUsageFixer();