mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix minor issue with notification of finished via KVO and return _fractionCompleted
This commit is contained in:
parent
11207f91b0
commit
639bb94056
1 changed files with 3 additions and 2 deletions
|
@ -216,7 +216,9 @@ static NSMutableDictionary *__subscribers = nil;
|
|||
/ (double)internal->_totalUnitCount);
|
||||
if(internal->_fractionCompleted >= 1)
|
||||
{
|
||||
[self willChangeValueForKey: @"finished"];
|
||||
internal->_finished = YES;
|
||||
[self didChangeValueForKey: @"finished"];
|
||||
}
|
||||
[self didChangeValueForKey: @"fractionCompleted"];
|
||||
|
||||
|
@ -246,8 +248,7 @@ static NSMutableDictionary *__subscribers = nil;
|
|||
// Observing progress
|
||||
- (double) fractionCompleted
|
||||
{
|
||||
return (double)((double)internal->_completedUnitCount
|
||||
/ (double)internal->_totalUnitCount);
|
||||
return internal->_fractionCompleted;
|
||||
}
|
||||
|
||||
// Controlling progress
|
||||
|
|
Loading…
Reference in a new issue