mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Prevent both view buttons being toggled off
This commit is contained in:
@@ -72,7 +72,12 @@ public abstract class ItemView<T extends InventoryItem> {
|
||||
this.button.setCommand(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
itemManager.setViewIndex(index);
|
||||
if (button.getSelected()) {
|
||||
itemManager.setViewIndex(index);
|
||||
}
|
||||
else {
|
||||
button.setSelected(true); //prevent toggling off button
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user