mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Fix so right-click updates table selection even if no context menu is shown
This commit is contained in:
@@ -1042,8 +1042,6 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void showContextMenu(MouseEvent e) {
|
public void showContextMenu(MouseEvent e) {
|
||||||
if (this.contextMenuBuilder == null) { return; }
|
|
||||||
|
|
||||||
//ensure the item manager has focus
|
//ensure the item manager has focus
|
||||||
this.focus();
|
this.focus();
|
||||||
|
|
||||||
@@ -1060,6 +1058,8 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel {
|
|||||||
this.setSelectedIndex(index);
|
this.setSelectedIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.contextMenuBuilder == null) { return; }
|
||||||
|
|
||||||
JPopupMenu menu = new JPopupMenu("ItemManagerContextMenu");
|
JPopupMenu menu = new JPopupMenu("ItemManagerContextMenu");
|
||||||
this.contextMenuBuilder.buildContextMenu(menu);
|
this.contextMenuBuilder.buildContextMenu(menu);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user