mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 08:51:13 +00:00
Fixed Generic tag editor - Disallow add before/after or remove on parent field with indices
This commit is contained in:
@@ -552,7 +552,9 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
JMenu mBegin = new JMenu(AppStrings.translate("generictag.array.insertbeginning").replace("%item%", itemStr));
|
||||
p.add(mBegin);
|
||||
JMenu mBefore = new JMenu(AppStrings.translate("generictag.array.insertbefore").replace("%item%", itemStr));
|
||||
p.add(mBefore);
|
||||
if (fnode.index > -1) {
|
||||
p.add(mBefore);
|
||||
}
|
||||
mi = new JMenuItem(AppStrings.translate("generictag.array.remove").replace("%item%", itemStr));
|
||||
mi.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
@@ -576,9 +578,15 @@ public class GenericTagTreePanel extends GenericTagPanel {
|
||||
}
|
||||
}
|
||||
});
|
||||
p.add(mi);
|
||||
|
||||
if (fnode.index > -1) {
|
||||
p.add(mi);
|
||||
}
|
||||
JMenu mAfter = new JMenu(AppStrings.translate("generictag.array.insertafter").replace("%item%", itemStr));
|
||||
p.add(mAfter);
|
||||
|
||||
if (fnode.index > -1) {
|
||||
p.add(mAfter);
|
||||
}
|
||||
|
||||
JMenu mEnd = new JMenu(AppStrings.translate("generictag.array.insertend").replace("%item%", itemStr));
|
||||
p.add(mEnd);
|
||||
|
||||
Reference in New Issue
Block a user