mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix so hover doesn't get stuck after right-clicking card in deck viewer
This commit is contained in:
@@ -1153,7 +1153,12 @@ public abstract class ItemManager<T extends InventoryItem> extends JPanel {
|
||||
this.setSelectedIndex(index);
|
||||
}
|
||||
|
||||
if (this.contextMenuBuilder == null) { return; }
|
||||
if (this.contextMenuBuilder == null) {
|
||||
if (onClose != null) {
|
||||
onClose.run(); //run onClose immediately even if no context menu shown
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
JPopupMenu menu = new JPopupMenu("ItemManagerContextMenu");
|
||||
this.contextMenuBuilder.buildContextMenu(menu);
|
||||
|
||||
Reference in New Issue
Block a user