Added Allow add tag after header context menu

Fixed Disallow add tag before header context menu
This commit is contained in:
Jindra Petřík
2022-10-31 07:19:17 +01:00
parent 465e0d3db9
commit 5c6da9e852
2 changed files with 10 additions and 2 deletions

View File

@@ -2,8 +2,12 @@
All notable changes to this project will be documented in this file.
## [Unreleased]
### Added
- Allow add tag after header context menu
### Fixed
- Do not show option to Show in taglist on resource view folders
- Disallow add tag before header context menu
## [16.0.0] - 2022-10-30
### Added

View File

@@ -78,6 +78,7 @@ import com.jpexs.decompiler.flash.timeline.TagScript;
import com.jpexs.decompiler.flash.timeline.Timelined;
import com.jpexs.decompiler.flash.treeitems.AS3ClassTreeItem;
import com.jpexs.decompiler.flash.treeitems.FolderItem;
import com.jpexs.decompiler.flash.treeitems.HeaderItem;
import com.jpexs.decompiler.flash.treeitems.SWFList;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
import com.jpexs.decompiler.flash.types.BUTTONCONDACTION;
@@ -674,7 +675,7 @@ public class TagTreeContextMenu extends JPopupMenu {
TreeItem parent = (TreeItem) tree.getModel().getTreePath(firstItem).getParentPath().getLastPathComponent();
addTagBeforeMenu.removeAll();
if (!isFolder) {
if (!isFolder && !(firstItem instanceof HeaderItem)) {
addAddTagMenuItems(getAllowedTagTypes(parent), addTagBeforeMenu, firstItem, this::addTagBeforeActionPerformed);
}
addTagBeforeMenu.setVisible(addTagBeforeMenu.getItemCount() > 0);
@@ -941,7 +942,7 @@ public class TagTreeContextMenu extends JPopupMenu {
}
}
}
if (timelined != null) {
if (index == -1) {
timelined.addTag(t);
@@ -994,6 +995,9 @@ public class TagTreeContextMenu extends JPopupMenu {
}
}
}
} else if (item instanceof HeaderItem) {
timelined = swf;
index = 0;
}
if (timelined != null) {