aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index a36591e8..6b2b22f1 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -3541,11 +3541,13 @@
[tabTitle appendString:[self name]];
}
- // If a database is selected, add to the window - and other tabs if host is the same but table is set
+ // If a database is selected, add to the window - and other tabs if host is the same but db different or table is not set
if ([self database]) {
[windowTitle appendFormat:@"/%@", [self database]];
if (frontTableDocument == self
+ || ![frontTableDocument getConnection]
|| [[frontTableDocument name] isNotEqualTo:[self name]]
+ || [[frontTableDocument database] isNotEqualTo:[self database]]
|| ![[self table] length])
{
if ([tabTitle length]) [tabTitle appendString:@"/"];