From d17209f7a0811177b5371f1d744a24be10477ac7 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 25 May 2010 23:45:18 +0000 Subject: - Fix Connection splitview resizing to affect the underlying view (and so correctly save). Fixes Issue #705 --- Source/SPConnectionController.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 582f80da..5e70b516 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -82,7 +82,7 @@ [databaseConnectionView setHidden:YES]; [connectionView setFrame:[databaseConnectionView frame]]; [databaseConnectionSuperview addSubview:connectionView]; - [connectionSplitView setPosition:[[tableDocument valueForKey:@"dbTablesTableView"] frame].size.width ofDividerAtIndex:0]; + [connectionSplitView setPosition:[[tableDocument valueForKey:@"dbTablesTableView"] frame].size.width-6 ofDividerAtIndex:0]; [connectionSplitViewButtonBar setSplitViewDelegate:self]; // Set up a keychain instance and preferences reference, and create the initial favorites list @@ -925,10 +925,13 @@ /** * When the split view is resized, trigger a resize in the hidden table * width as well, to keep the connection view and connected view in synch. + * Use this rather than splitViewDidResizeSubviews: as the latter is not + * forwarded by the BWAnchoredButtonBar. */ -- (void) splitViewDidResizeSubviews:(NSNotification *)aNotification +- (CGFloat)splitView:(NSSplitView *)splitView constrainSplitPosition:(CGFloat)proposedPosition ofSubviewAt:(NSInteger)dividerIndex { [databaseConnectionView setPosition:[[[connectionSplitView subviews] objectAtIndex:0] frame].size.width ofDividerAtIndex:0]; + return proposedPosition; } /** -- cgit v1.2.3