From 244cabf78191e52da7ebd644d6a06cbaaa9549fb Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 7 Jul 2010 08:01:06 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20issue=20if=20connection=20window=20?= =?UTF-8?q?is=20opened=20with=20collapsed=20Table=20Information=20that=20t?= =?UTF-8?q?he=20view=20wasn't=20displayed=20correctly=20after=20opening=20?= =?UTF-8?q?-=20the=20point=20is=20here=20probably=20a=20bug=20in=20BWToolk?= =?UTF-8?q?it=20that=20the=20collapsable=20subview=20forgets=20its=20setti?= =?UTF-8?q?ng=20for=20"setAutoresizesSubviews:YES"=20after=20collapsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTablesList.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index e1647cf7..88803273 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -544,12 +544,22 @@ [alert beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"truncateTable"]; } +- (void)restoreAutoresizesSubviews:(NSNumber *)flag +{ + [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:[flag boolValue]]; +} + /** * Toggle whether the splitview is collapsed. */ - (IBAction)togglePaneCollapse:(id)sender { + [tableListSplitView toggleCollapse:sender]; + + // Probably due to a bug in BWToolkit we have to reset setAutoresizesSubviews to YES + [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:YES]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:([tableInfoCollapseButton state] == NSOffState)] forKey:SPTableInformationPanelCollapsed]; [tableInfoCollapseButton setToolTip:([tableInfoCollapseButton state] == NSOffState) ? NSLocalizedString(@"Show Table Information", @"Show Table Information") : NSLocalizedString(@"Hide Table Information", @"Hide Table Information")]; } -- cgit v1.2.3