From 5e8e28525408b4dc70480d543d8e011c32c2bc81 Mon Sep 17 00:00:00 2001 From: Marcian Lytwyn Date: Fri, 26 Jun 2015 18:05:15 +0000 Subject: [PATCH] NSCell, NSClipView and NSCollectionView merges git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38707 72102866-910b-0410-8b05-ffd578937521 --- Source/NSCell.m | 3 ++- Source/NSClipView.m | 7 +++---- Source/NSCollectionView.m | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/NSCell.m b/Source/NSCell.m index 77bc7ff86..3ce833ba6 100644 --- a/Source/NSCell.m +++ b/Source/NSCell.m @@ -1791,6 +1791,7 @@ static NSColor *dtxtCol; return NO; // Otherwise return NO } +// Testplant-MAL-2015-06-26: Keeping testplant fixes for this method... - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView { NSUInteger hitResult = NSCellHitNone; @@ -2317,7 +2318,7 @@ static NSColor *dtxtCol; _cell.shows_first_responder = YES; _cell.in_editing = YES; -#if 1 +#if 0 // Testplant-MAL-2015-06-20: merging removal causes focus ring issues... // FIXME: we need to draw the focus ring, this works but // there's something wrong about telling the view to come diff --git a/Source/NSClipView.m b/Source/NSClipView.m index 55b577709..ef8900cfd 100644 --- a/Source/NSClipView.m +++ b/Source/NSClipView.m @@ -180,6 +180,7 @@ static inline NSRect integralRect (NSRect rect, NSView *view) df = [_documentView frame]; [self setBoundsOrigin: df.origin]; + // Testplant-MAL-2015-06-26: Keeping testplant fixes... if ([aView respondsToSelector: @selector(backgroundColor)]) { [self setBackgroundColor: [(id)aView backgroundColor]]; @@ -239,15 +240,15 @@ static inline NSRect integralRect (NSRect rect, NSView *view) - (void) setBounds: (NSRect)b { - // FIXME: Shouldn't the document view be marked as needing a redraw? [super setBounds: b]; + [self setNeedsDisplay: YES]; [_super_view reflectScrolledClipView: self]; } - (void) setBoundsSize: (NSSize)aSize { - // FIXME: Shouldn't the document view be marked as needing a redraw? [super setBoundsSize: aSize]; + [self setNeedsDisplay: YES]; [_super_view reflectScrolledClipView: self]; } @@ -275,8 +276,6 @@ static inline NSRect integralRect (NSRect rect, NSView *view) scrolling. Then, document view needs to redraw the remaining areas. */ - - /* Common part - which is a first approx of what we could copy... */ intersection = NSIntersectionRect (originalBounds, newBounds); diff --git a/Source/NSCollectionView.m b/Source/NSCollectionView.m index d3e924e65..26be8e165 100644 --- a/Source/NSCollectionView.m +++ b/Source/NSCollectionView.m @@ -166,6 +166,7 @@ static NSString *placeholderItem = nil; { // Calling itemAtIndex: will eventually instantiate the collection view item, // if it hasn't been done already. + // Testplant-MAL-2015-06-26: Keeping testplant fixes... if (index < [_items count]) { NSCollectionViewItem *collectionItem = [self itemAtIndex: index]; @@ -476,6 +477,7 @@ static NSString *placeholderItem = nil; { [item setSelected: YES]; } + // Testplant-MAL-2015-06-26: Keeping testplant fixes... // Frank LeGrand 4/25/13: // We set this initial rect as a workaround for a weird display // issue in our app where the item view would get drawn in front @@ -527,7 +529,7 @@ static NSString *placeholderItem = nil; return; CGFloat width = [self bounds].size.width; - //NSLog(@"tile: width = %g, previous width = %g", width, _tileWidth); + // Testplant-MAL-2015-06-26: Keeping testplant fixes... if (isnan(width) || ABS(width - _tileWidth) <= 1) return; @@ -602,7 +604,6 @@ static NSString *placeholderItem = nil; NSSize currentSize = [self frame].size; if (!NSEqualSizes(currentSize, aSize)) { - //NSLog(@"resizeSubviews: new size = %g x %g, currentSize = %g x %g", aSize.width, aSize.height, currentSize.width, currentSize.height); [self tile]; } }