Ignore start animation if progress indicator view is set to hidden

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38034 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2014-08-04 21:22:13 +00:00
parent a5e0050e55
commit 1765fa3698

View file

@ -85,7 +85,9 @@
{ {
if (!_isIndeterminate && (_style == NSProgressIndicatorBarStyle)) if (!_isIndeterminate && (_style == NSProgressIndicatorBarStyle))
return; return;
if ([self isHidden] == YES)
return; // Don't update if hidden...
// Let this value overflow when it reachs the limit // Let this value overflow when it reachs the limit
_count++; _count++;
@ -125,8 +127,7 @@
if (_isRunning || (!_isIndeterminate if (_isRunning || (!_isIndeterminate
&& (_style == NSProgressIndicatorBarStyle))) && (_style == NSProgressIndicatorBarStyle)))
return; return;
[self setHidden:NO];
_isRunning = YES; _isRunning = YES;
if (!_usesThreadedAnimation) if (!_usesThreadedAnimation)
{ {