From 8a011ccb6ea326255f4f85312e5ba4ff206c2e2e Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Tue, 26 Jun 2012 09:07:36 +0000 Subject: Silence static analyzer warnings. --- Source/SPWindowController.m | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Source/SPWindowController.m') 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 */ -- cgit v1.2.3