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,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();
} }