Cannot compile on 1.6 because var names not clear
authorNiki Roo <niki@nikiroo.be>
Sun, 5 Mar 2017 19:32:11 +0000 (20:32 +0100)
committerNiki Roo <niki@nikiroo.be>
Sun, 5 Mar 2017 19:32:11 +0000 (20:32 +0100)
src/be/nikiroo/utils/ui/ProgressBar.java

index 6e1e44a9f7057748389047c5d7def8c0aabf7982..3e854f791d10dbb212c885f98d5a7256d0bacdf2 100644 (file)
@@ -65,19 +65,20 @@ public class ProgressBar extends JPanel {
                                                                        bar.setValue(pg.getProgress());
                                                                        bar.setString(pg.getName());
 
-                                                                       for (Progress pg : getChildrenAsOrderedList(pg)) {
-                                                                               JProgressBar bar = bars.get(pg);
-                                                                               if (bar == null) {
-                                                                                       bar = new JProgressBar();
-                                                                                       bar.setStringPainted(true);
+                                                                       for (Progress pgChild : getChildrenAsOrderedList(pg)) {
+                                                                               JProgressBar barChild = bars
+                                                                                               .get(pgChild);
+                                                                               if (barChild == null) {
+                                                                                       barChild = new JProgressBar();
+                                                                                       barChild.setStringPainted(true);
                                                                                }
 
-                                                                               newBars.put(pg, bar);
+                                                                               newBars.put(pgChild, barChild);
 
-                                                                               bar.setMinimum(pg.getMin());
-                                                                               bar.setMaximum(pg.getMax());
-                                                                               bar.setValue(pg.getProgress());
-                                                                               bar.setString(pg.getName());
+                                                                               barChild.setMinimum(pgChild.getMin());
+                                                                               barChild.setMaximum(pgChild.getMax());
+                                                                               barChild.setValue(pgChild.getProgress());
+                                                                               barChild.setString(pgChild.getName());
                                                                        }
 
                                                                        if (ProgressBar.this.pg == null) {