Fix some warnings
[nikiroo-utils.git] / src / be / nikiroo / utils / Progress.java
index 6f05110e8715305b438258b45cf1674b992a4451..ce88f3d8f8c55941bccc094d58b2fd42954be59c 100644 (file)
@@ -397,7 +397,7 @@ public class Progress {
                if (weight < min || weight > max) {
                        throw new RuntimeException(String.format(
                                        "Progress object %s cannot have a weight of %f, "
-                                                       + "it is outside of its parent (%s) range (%f)",
+                                                       + "it is outside of its parent (%s) range (%d)",
                                        progress.name, weight, name, max));
                }
 
@@ -408,6 +408,8 @@ public class Progress {
                                        name, progress.parent.name));
                }
 
+               progress.parent = this;
+
                progress.addProgressListener(new ProgressListener() {
                        @Override
                        public void progress(Progress pg, String name) {