Fix issue with card zoom following double-click activation

This commit is contained in:
drdev
2014-03-24 01:38:36 +00:00
parent cf3425cfde
commit 51a20a21d2

View File

@@ -138,7 +138,6 @@ 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;
@@ -149,7 +148,6 @@ public class FCardZoom extends FOverlay {
prompt.getBtnCancel().setEnabled(false); prompt.getBtnCancel().setEnabled(false);
super.hide(); super.hide();
} }
}
private void selectFirstOption() { private void selectFirstOption() {
selectOption(optionList.getItemAt(0)); selectOption(optionList.getItemAt(0));
@@ -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();
} }