aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPWindowController.m')
-rw-r--r--Source/SPWindowController.m7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index 7f3c687b..9755cd0d 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -160,15 +160,14 @@
*/
- (IBAction)closeTab:(id)sender
{
- // Return if the selected tab shouldn't be closed
- if (![selectedTableDocument parentTabShouldClose]) return;
-
// If there are multiple tabs, close the front tab.
if ([tabView numberOfTabViewItems] > 1) {
+ // Return if the selected tab shouldn't be closed
+ if (![selectedTableDocument parentTabShouldClose]) return;
[tabView removeTabViewItem:[tabView selectedTabViewItem]];
-
}
else {
+ //trying to close the window will itself call parentTabShouldClose for all tabs in windowShouldClose:
[[self window] performClose:self];
}
}