Reinstate not bothering the parent observer if the size of the current
element is 0.
This commit is contained in:
@@ -48,8 +48,10 @@ public class MetaProgressObserver implements ProgressObserver
|
|||||||
// documentation inherited from interface
|
// documentation inherited from interface
|
||||||
public void progress (int percent)
|
public void progress (int percent)
|
||||||
{
|
{
|
||||||
|
if (_elementSize > 0) {
|
||||||
_target.progress((int)((_accum + (percent * _elementSize)) / _totalSize));
|
_target.progress((int)((_accum + (percent * _elementSize)) / _totalSize));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected ProgressObserver _target;
|
protected ProgressObserver _target;
|
||||||
protected long _totalSize, _accum, _elementSize;
|
protected long _totalSize, _accum, _elementSize;
|
||||||
|
|||||||
Reference in New Issue
Block a user