git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bc55b5
)
Fix progress
author
Niki Roo
<niki@nikiroo.be>
Thu, 23 Nov 2017 18:10:12 +0000
(19:10 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Thu, 23 Nov 2017 18:10:12 +0000
(19:10 +0100)
src/be/nikiroo/utils/Progress.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/utils/Progress.java
b/src/be/nikiroo/utils/Progress.java
index d722fc91c3289e9f0b0425cba4bfba87fdc1b88f..ae5960379f12bcd2cecc17d3f7a81134f38ca018 100644
(file)
--- a/
src/be/nikiroo/utils/Progress.java
+++ b/
src/be/nikiroo/utils/Progress.java
@@
-293,14
+293,18
@@
public class Progress {
* @return TRUE if it is
*/
public boolean isDone() {
- return
relativeProgress >= 1d
;
+ return
getProgress() == max
;
}
/**
* Mark the {@link Progress} as done by setting its value to max.
*/
public void done() {
- setProgress(getMax());
+ synchronized (getLock()) {
+ double childrenProgress = relativeProgress - relativeLocalProgress;
+ relativeLocalProgress = 1 - childrenProgress;
+ setRelativeProgress(this, name, 1d);
+ }
}
/**