Let gutter view observe frame changes from OakTextView

Previously it would only observe NSViewBoundsDidChange from the clip view containing the text view, and while it worked most of the time, it failed to see notifications when a text view was smaller than the clip view’s view port and grew, yet still staying smaller than the view port.
This commit is contained in:
Allan Odgaard
2013-08-12 23:44:51 +02:00
parent 5512d65ecf
commit 41b4f03712

View File

@@ -149,7 +149,10 @@ struct data_source_t
if(_partnerView)
[[NSNotificationCenter defaultCenter] removeObserver:self];
if(_partnerView = aView)
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChange:) name:NSViewBoundsDidChangeNotification object:[[_partnerView enclosingScrollView] contentView]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChange:) name:NSViewFrameDidChangeNotification object:_partnerView];
}
}
- (void)insertColumnWithIdentifier:(NSString*)columnIdentifier atPosition:(NSUInteger)index dataSource:(id <GutterViewColumnDataSource>)columnDataSource delegate:(id <GutterViewColumnDelegate>)columnDelegate