X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbe%2Fnikiroo%2Futils%2FProgress.java;h=a8940fc00816cb8a84a596faef013fcc0b35d2c8;hb=62c9ec78bcd5d7016e6d1447b4422955cb55b198;hp=bea57845bcefaf4a8fd336d8e284750ae8488f8c;hpb=9d0ee6519827d35b14a9ed923a9976a5e910830f;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/Progress.java b/src/be/nikiroo/utils/Progress.java index bea5784..a8940fc 100644 --- a/src/be/nikiroo/utils/Progress.java +++ b/src/be/nikiroo/utils/Progress.java @@ -296,7 +296,7 @@ public class Progress { // Note: this is quite inefficient, especially with many children // TODO: improve it? progress.addProgressListener(new ProgressListener() { - public void progress(Progress progress, String name) { + public void progress(Progress pg, String name) { double total = ((double) localProgress) / (max - min); for (Entry entry : children.entrySet()) { total += (entry.getValue() / (max - min)) @@ -307,7 +307,7 @@ public class Progress { name = Progress.this.name; } - setTotalProgress(progress, name, + setTotalProgress(pg, name, (int) Math.round(total * (max - min))); } });