aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowController.m
diff options
context:
space:
mode:
authorAbhi Beckert <abhi@abhibeckert.com>2017-08-04 13:20:12 +1000
committerAbhi Beckert <abhi@abhibeckert.com>2017-08-04 13:20:12 +1000
commitebf7d8b7db4144d304bf2224db19d787d631eda0 (patch)
tree5b1481d8ded07101891b3acce80b385a204f1ef8 /Source/SPWindowController.m
parentff1db69283f69b8e9dc7fc373db242c37698c7c2 (diff)
parent1cbc8f7ca081a6538a2df484d89723cf441acb3c (diff)
downloadsequelpro-ebf7d8b7db4144d304bf2224db19d787d631eda0.tar.gz
sequelpro-ebf7d8b7db4144d304bf2224db19d787d631eda0.tar.bz2
sequelpro-ebf7d8b7db4144d304bf2224db19d787d631eda0.zip
Merge remote-tracking branch 'sequelpro/master'
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];
}
}