Prevent division by zero exception if a theme has no images for a

spinning or indeterminate progress indicator.
Ensure that a running animation is stopped when an indeterminate
indicator is changed into a determinate one.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29136 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
wlux 2009-12-17 02:36:22 +00:00
parent f670165fc2
commit 406fe08ad8
3 changed files with 30 additions and 11 deletions

View file

@ -258,11 +258,14 @@
- (void) setIndeterminate: (BOOL)flag
{
_isIndeterminate = flag;
// Maybe we need more functionality here when we implement indeterminate
/* Note: We must stop a running animation before setting _isIndeterminate
because -stopAnimation: has no effect when _isIndeterminate is NO. */
if (flag == NO && _isRunning)
[self stopAnimation: self];
_isIndeterminate = flag;
// Maybe we need more functionality here when we implement indeterminate
[self setNeedsDisplay: YES];
}