Don’t update the progress bar if the progress is 0.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 02:06:47 +0000 (03:06 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 02:06:47 +0000 (03:06 +0100)
src/de/todesbaum/jsite/gui/ProjectInsertPage.java

index 66a0c0d..99b2b81 100644 (file)
@@ -387,6 +387,9 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
 
                        @SuppressWarnings("synthetic-access")
                        public void run() {
+                               if (total == 0) {
+                                       return;
+                               }
                                progressBar.setMaximum(total);
                                progressBar.setValue(succeeded + failed + fatal);
                                int progress = (succeeded + failed + fatal) * 100 / total;