diff options
author | stuconnolly <stuart02@gmail.com> | 2012-06-26 09:07:36 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-06-26 09:07:36 +0000 |
commit | 8a011ccb6ea326255f4f85312e5ba4ff206c2e2e (patch) | |
tree | 0ce883a10089d2e89745ab193ba0451ee001f58f /Source/SPWindowController.m | |
parent | 0770ecf46cb1072e3327598fe8aa850cdd818302 (diff) | |
download | sequelpro-8a011ccb6ea326255f4f85312e5ba4ff206c2e2e.tar.gz sequelpro-8a011ccb6ea326255f4f85312e5ba4ff206c2e2e.tar.bz2 sequelpro-8a011ccb6ea326255f4f85312e5ba4ff206c2e2e.zip |
Silence static analyzer warnings.
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r-- | Source/SPWindowController.m | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m index eeecca68..10c64586 100644 --- a/Source/SPWindowController.m +++ b/Source/SPWindowController.m @@ -213,9 +213,8 @@ enum { /** * Move the currently selected tab to a new window. */ -- (IBAction) moveSelectedTabInNewWindow:(id)sender +- (IBAction)moveSelectedTabInNewWindow:(id)sender { - static NSPoint cascadeLocation = {.x = 0, .y = 0}; SPDatabaseDocument *selectedDocument = [[tabView selectedTabViewItem] identifier]; @@ -226,6 +225,7 @@ enum { NSWindow *newWindow = [newWindowController window]; CGFloat toolbarHeight = 0; + if ([[[self window] toolbar] isVisible]) { NSRect innerFrame = [NSWindow contentRectForFrameRect:[[self window] frame] styleMask:[[self window] styleMask]]; toolbarHeight = innerFrame.size.height - [[[self window] contentView] frame].size.height; @@ -277,8 +277,7 @@ enum { // Update tabBar of the new window [newWindowController tabView:[tabBar tabView] didDropTabViewItem:[selectedCell representedObject] inTabBar:control]; - [newWindow makeKeyAndOrderFront:nil]; - + [newWindow makeKeyAndOrderFront:nil]; } /** @@ -291,7 +290,6 @@ enum { [[NSUserDefaults standardUserDefaults] setBool:![tabBar hideForSingleTab] forKey:SPAlwaysShowWindowTabBar]; } - /** * Menu validation */ |