Skip to content

Commit

Permalink
fixed: Do/SX::popAsk() should return None/null in case of closed or t…
Browse files Browse the repository at this point in the history
…imed out.
  • Loading branch information
RaiMan committed Mar 12, 2020
1 parent 9df1766 commit 346397f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion API/src/main/java/org/sikuli/script/SX.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ public void run() {
} else if (PopType.POPASK.equals(popType)) {
int ret = JOptionPane.showConfirmDialog(frame, message, title, JOptionPane.YES_NO_OPTION);
returnValue = Boolean.TRUE;
if (ret == JOptionPane.CLOSED_OPTION || ret == JOptionPane.NO_OPTION) {
if (ret == JOptionPane.CLOSED_OPTION) {
returnValue = null;
} else if (ret == JOptionPane.NO_OPTION) {
returnValue = Boolean.FALSE;
}
} else if (PopType.POPERROR.equals(popType)) {
Expand Down

0 comments on commit 346397f

Please sign in to comment.