aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-07-07 23:45:33 +0000
committerrowanbeentje <rowan@beent.je>2010-07-07 23:45:33 +0000
commit597831807944d7441a254c3475d8f957feafb5bb (patch)
treefe744d7f909fc41eac4f69c2474b5f2f18e4b887
parent2a1f907c897a4aa6970ed56cfc97e50307e4ea1a (diff)
downloadsequelpro-597831807944d7441a254c3475d8f957feafb5bb.tar.gz
sequelpro-597831807944d7441a254c3475d8f957feafb5bb.tar.bz2
sequelpro-597831807944d7441a254c3475d8f957feafb5bb.zip
- Roll back most of r2430, replacing it with an at-source fix to the manual collapse via code which was originally causing the problem. Also apply the same fix to SPCustomQuery.m.
(Note that this also identifies a probable cause of views going slightly out-of-view if views are collapsed and expanded a lot - the autoResizesSubviews property is disabled and re-enabled in BWToolKit surrounding a collapse, but this is done using a timer with the exact time interval as the corresponding collapse/expand frame resize. This sets up a race condition, where if the timer fires before the animation completes, the internal view will be slightly clipped. May require a BWToolKit fix)
-rw-r--r--Source/SPCustomQuery.m2
-rw-r--r--Source/SPTablesList.m11
2 files changed, 4 insertions, 9 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 143e40f8..ebc4f726 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -3257,8 +3257,10 @@
[queryInfoButton setToolTip:NSLocalizedString(@"Show Query Information", @"Show Query Information")];
[queryInfoPaneSplitView setValue:[NSNumber numberWithFloat:[queryInfoPaneSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"];
+ [[queryInfoPaneSplitView collapsibleSubview] setAutoresizesSubviews:NO];
[[queryInfoPaneSplitView collapsibleSubview] setFrameSize:NSMakeSize([queryInfoPaneSplitView collapsibleSubview].frame.size.width, 0)];
[queryInfoPaneSplitView setCollapsibleSubviewCollapsed:YES];
+ [[queryInfoPaneSplitView collapsibleSubview] setAutoresizesSubviews:YES];
}*/
}
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m
index 88803273..a6e46c37 100644
--- a/Source/SPTablesList.m
+++ b/Source/SPTablesList.m
@@ -544,22 +544,13 @@
[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")];
}
@@ -1875,8 +1866,10 @@
[tableInfoCollapseButton setNextState];
[tableInfoCollapseButton setToolTip:NSLocalizedString(@"Show Table Information",@"Show Table Information")];
[tableListSplitView setValue:[NSNumber numberWithFloat:[tableListSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"];
+ [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:NO];
[[tableListSplitView collapsibleSubview] setFrameSize:NSMakeSize([tableListSplitView collapsibleSubview].frame.size.width, 0)];
[tableListSplitView setCollapsibleSubviewCollapsed:YES];
+ [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:YES];
} else {
[tableInfoCollapseButton setToolTip:NSLocalizedString(@"Hide Table Information",@"Hide Table Information")];
}