mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Fix issue with card zoom following double-click activation
This commit is contained in:
@@ -138,17 +138,15 @@ public class FCardZoom extends FOverlay {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void hide() {
|
public void hide() {
|
||||||
if (isVisible()) {
|
orderedCards = null; //reset fields when hidden
|
||||||
orderedCards = null; //reset fields when hidden
|
controller = null;
|
||||||
controller = null;
|
selectedIndex = -1;
|
||||||
selectedIndex = -1;
|
optionList.clear();
|
||||||
optionList.clear();
|
optionListExpanded = false;
|
||||||
optionListExpanded = false;
|
prompt.setMessage(null);
|
||||||
prompt.setMessage(null);
|
prompt.getBtnCancel().setText("More");
|
||||||
prompt.getBtnCancel().setText("More");
|
prompt.getBtnCancel().setEnabled(false);
|
||||||
prompt.getBtnCancel().setEnabled(false);
|
super.hide();
|
||||||
super.hide();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectFirstOption() {
|
private void selectFirstOption() {
|
||||||
@@ -159,6 +157,7 @@ public class FCardZoom extends FOverlay {
|
|||||||
private void selectOption(Object option) {
|
private void selectOption(Object option) {
|
||||||
if (option == null ||
|
if (option == null ||
|
||||||
controller.selectOption(orderedCards.get(selectedIndex), option) ||
|
controller.selectOption(orderedCards.get(selectedIndex), option) ||
|
||||||
|
!isVisible() ||
|
||||||
selectedIndex == orderedCards.size() - 1) {
|
selectedIndex == orderedCards.size() - 1) {
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user