mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:00:38 +00:00
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:
parent
f670165fc2
commit
406fe08ad8
3 changed files with 30 additions and 11 deletions
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue