aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTablesList.m10
1 files changed, 10 insertions, 0 deletions
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")];
}