X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=ui%2FWaitingDialog.java;h=0fd4574d893aa5e5650e4adc73e83ae9efba15ae;hb=712ddafb749aada41daab85c36ac12f657b2307e;hp=15dca6cce1655352e72ebba268086c6c239cdcca;hpb=9fc2e7157d8b95035dcfbbd976a8408096d4ea3c;p=fanfix.git diff --git a/ui/WaitingDialog.java b/ui/WaitingDialog.java index 15dca6c..0fd4574 100644 --- a/ui/WaitingDialog.java +++ b/ui/WaitingDialog.java @@ -93,6 +93,8 @@ public class WaitingDialog extends JDialog { String waitingText) { super(parent); + this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); + this.pg = pg; if (waitingText != null) { @@ -154,6 +156,8 @@ public class WaitingDialog extends JDialog { /** * Notify this {@link WaitingDialog} that the job is done, and dismiss it if * it was already showing on screen (or never show it if it was not). + *

+ * Will also dispose the {@link WaitingDialog}. */ public void dismiss() { synchronized (waitLock) { @@ -166,5 +170,7 @@ public class WaitingDialog extends JDialog { if (pg != null) { pg.removeProgressListener(pgl); } + + dispose(); } }