Skip to content

Commit

Permalink
Update DialogCloser.java
Browse files Browse the repository at this point in the history
  • Loading branch information
riverwanderer committed Nov 20, 2024
1 parent 15f74dc commit 15e68e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions vassal-app/src/main/java/VASSAL/tools/swing/DialogCloser.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ public DialogCloser(JDialog dialog, int ms) {

@Override
public void run() {
try {
Thread.sleep(ms);
}
catch (InterruptedException e) {
throw new RuntimeException(e);
if (ms > 1) { // Zero means no sleep - refresh only
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
dialog.setVisible(false);
dialog.dispose();
Expand Down

0 comments on commit 15e68e1

Please sign in to comment.