aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAbhi Beckert <abhi@abhibeckert.com>2017-08-25 10:20:45 +1000
committerGitHub <noreply@github.com>2017-08-25 10:20:45 +1000
commit2e809e64e4f2a22efc68ec9ba7afa6489218cf3d (patch)
tree6a67d010d2d3c4b911936c0d2b06826c87241f7e /Source
parent0625044f52367c2e5778c326f6ca3f4fe3bdcc78 (diff)
parent16cf257c447d9692ce19280c510f11afa0ac12fa (diff)
downloadsequelpro-2e809e64e4f2a22efc68ec9ba7afa6489218cf3d.tar.gz
sequelpro-2e809e64e4f2a22efc68ec9ba7afa6489218cf3d.tar.bz2
sequelpro-2e809e64e4f2a22efc68ec9ba7afa6489218cf3d.zip
Merge pull request #2868 from abhibeckert/master
#2863 fix LHS table views when dragging a tab off a window
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseDocument.h2
-rw-r--r--Source/SPWindowControllerDelegate.m11
2 files changed, 13 insertions, 0 deletions
diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h
index fc00f647..5430b39f 100644
--- a/Source/SPDatabaseDocument.h
+++ b/Source/SPDatabaseDocument.h
@@ -291,6 +291,8 @@
int64_t instanceId;
}
+@property (assign) NSTableView *dbTablesTableView;
+
#ifdef SP_CODA /* ivars */
@property (assign) SPDatabaseData* databaseDataInstance;
@property (assign) SPTableData* tableDataInstance;
diff --git a/Source/SPWindowControllerDelegate.m b/Source/SPWindowControllerDelegate.m
index 009dc0a4..ba7f6303 100644
--- a/Source/SPWindowControllerDelegate.m
+++ b/Source/SPWindowControllerDelegate.m
@@ -33,6 +33,8 @@
#import "SPDatabaseDocument.h"
#import "SPDatabaseViewController.h"
#import "SPAppController.h"
+#import "SPConnectionController.h"
+#import "SPFavoritesOutlineView.h"
#import <PSMTabBar/PSMTabBarControl.h>
#import <PSMTabBar/PSMTabStyle.h>
@@ -248,6 +250,15 @@
// Check the window and move it to front if it's key (eg for new window creation)
if ([[tabBarControl window] isKeyWindow]) [[tabBarControl window] orderFront:self];
+
+ // workaround bug where "source list" table views are broken in the new window. See https://github.com/sequelpro/sequelpro/issues/2863
+ SPWindowController *newWindowController = tabBarControl.window.windowController;
+ newWindowController.selectedTableDocument.connectionController.favoritesOutlineView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleRegular;
+ newWindowController.selectedTableDocument.dbTablesTableView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleRegular;
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0)), dispatch_get_main_queue(), ^{
+ newWindowController.selectedTableDocument.dbTablesTableView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleSourceList;
+ newWindowController.selectedTableDocument.connectionController.favoritesOutlineView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleSourceList;
+ });
}
/**