mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +00:00
* Source/NSCollectionView.m (-drawRect:): Work around strange
behaviour of compiler. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38382 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a0e08ea59a
commit
896756ae92
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-03-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSCollectionView.m (-drawRect:): Work around strange
|
||||
behaviour of compiler.
|
||||
|
||||
2015-03-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSImageView.m (-initWithFrame:): Set default for AllowsCutCopyPaste.
|
||||
|
|
|
@ -151,8 +151,11 @@ static NSString *placeholderItem = nil;
|
|||
NSPoint oppositeOrigin = NSMakePoint (origin.x + size.width, origin.y + size.height);
|
||||
|
||||
NSInteger firstIndexInRect = MAX(0, [self _indexAtPoint: origin]);
|
||||
NSInteger lastIndexInRect = MIN([_items count] - 1, [self _indexAtPoint: oppositeOrigin]);
|
||||
NSInteger index;
|
||||
// I had to extract these values from the macro to get it
|
||||
// working correctly.
|
||||
NSInteger index = [self _indexAtPoint: oppositeOrigin];
|
||||
NSInteger last = [_items count] - 1;
|
||||
NSInteger lastIndexInRect = MIN(last, index);
|
||||
|
||||
for (index = firstIndexInRect; index <= lastIndexInRect; index++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue