diff options
Diffstat (limited to 'src/main/java/cuchaz/enigma/gui/dialog')
| -rw-r--r-- | src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java b/src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java index cf5c2c8..ae30667 100644 --- a/src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java +++ b/src/main/java/cuchaz/enigma/gui/dialog/ProgressDialog.java | |||
| @@ -89,7 +89,12 @@ public class ProgressDialog implements ProgressListener, AutoCloseable { | |||
| 89 | @Override | 89 | @Override |
| 90 | public void step(int numDone, String message) { | 90 | public void step(int numDone, String message) { |
| 91 | this.labelText.setText(message); | 91 | this.labelText.setText(message); |
| 92 | this.progress.setValue(numDone); | 92 | if (numDone != -1) { |
| 93 | this.progress.setValue(numDone); | ||
| 94 | this.progress.setIndeterminate(false); | ||
| 95 | } else { | ||
| 96 | this.progress.setIndeterminate(true); | ||
| 97 | } | ||
| 93 | 98 | ||
| 94 | // update the frame | 99 | // update the frame |
| 95 | this.frame.validate(); | 100 | this.frame.validate(); |