mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 23:50:59 +00:00
prevent infinite recursion if width is NaN
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37810 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a2c9a6f583
commit
cf0a37304e
1 changed files with 3 additions and 3 deletions
|
@ -517,8 +517,8 @@ static NSString *placeholderItem = nil;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CGFloat width = [self bounds].size.width;
|
CGFloat width = [self bounds].size.width;
|
||||||
NSLog(@"tile: width = %g, previous width = %g", width, _tileWidth);
|
//NSLog(@"tile: width = %g, previous width = %g", width, _tileWidth);
|
||||||
if (ABS(width - _tileWidth) <= 2)
|
if (isnan(width) || ABS(width - _tileWidth) <= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NSSize itemSize = NSMakeSize(_minItemSize.width, _minItemSize.height);
|
NSSize itemSize = NSMakeSize(_minItemSize.width, _minItemSize.height);
|
||||||
|
@ -587,7 +587,7 @@ static NSString *placeholderItem = nil;
|
||||||
NSSize currentSize = [self frame].size;
|
NSSize currentSize = [self frame].size;
|
||||||
if (!NSEqualSizes(currentSize, aSize))
|
if (!NSEqualSizes(currentSize, aSize))
|
||||||
{
|
{
|
||||||
NSLog(@"resizeSubviews: new size = %g x %g, currentSize = %g x %g", aSize.width, aSize.height, currentSize.width, currentSize.height);
|
//NSLog(@"resizeSubviews: new size = %g x %g, currentSize = %g x %g", aSize.width, aSize.height, currentSize.width, currentSize.height);
|
||||||
[self tile];
|
[self tile];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue