mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 17:10:57 +00:00
Added: "Show detail" context menu item for items in folder preview
This commit is contained in:
@@ -19,7 +19,6 @@ package com.jpexs.decompiler.flash.gui;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.gui.tagtree.AbstractTagTree;
|
||||
import com.jpexs.decompiler.flash.tags.Tag;
|
||||
import com.jpexs.decompiler.flash.treeitems.Openable;
|
||||
import com.jpexs.decompiler.flash.treeitems.TreeItem;
|
||||
import com.jpexs.helpers.SerializableImage;
|
||||
import java.awt.Color;
|
||||
@@ -110,11 +109,7 @@ public class FolderListPanel extends JPanel {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getClickCount() > 1) {
|
||||
if (selectedIndex > -1) {
|
||||
TreeItem selectedItem = FolderListPanel.this.items.get(selectedIndex);
|
||||
TreePath subPath = parentPath.pathByAddingChild(selectedItem);
|
||||
mainPanel.getCurrentTree().setSelectionPath(subPath);
|
||||
}
|
||||
goToSelection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +153,7 @@ public class FolderListPanel extends JPanel {
|
||||
}
|
||||
|
||||
if (SwingUtilities.isRightMouseButton(e)) {
|
||||
mainPanel.getContextPopupMenu().update(getSelectedItemsSorted());
|
||||
mainPanel.getContextPopupMenu().update(getSelectedItemsSorted(), true);
|
||||
mainPanel.getContextPopupMenu().show(FolderListPanel.this, e.getX(), e.getY());
|
||||
}
|
||||
repaint();
|
||||
@@ -166,6 +161,14 @@ public class FolderListPanel extends JPanel {
|
||||
});
|
||||
setFocusable(true);
|
||||
}
|
||||
|
||||
public void goToSelection() {
|
||||
if (selectedIndex > -1) {
|
||||
TreeItem selectedItem = FolderListPanel.this.items.get(selectedIndex);
|
||||
TreePath subPath = parentPath.pathByAddingChild(selectedItem);
|
||||
mainPanel.getCurrentTree().setSelectionPath(subPath);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void setItems(TreePath parentPath, List<TreeItem> items) {
|
||||
this.items = items;
|
||||
|
||||
Reference in New Issue
Block a user