aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPWindowControllerDelegate.m
diff options
context:
space:
mode:
authorAbhi Beckert <abhi@abhibeckert.com>2017-08-25 10:19:58 +1000
committerAbhi Beckert <abhi@abhibeckert.com>2017-08-25 10:19:58 +1000
commit16cf257c447d9692ce19280c510f11afa0ac12fa (patch)
tree6a67d010d2d3c4b911936c0d2b06826c87241f7e /Source/SPWindowControllerDelegate.m
parentff0e2a82ef4452abcb407449f82fbefaac323b5d (diff)
downloadsequelpro-16cf257c447d9692ce19280c510f11afa0ac12fa.tar.gz
sequelpro-16cf257c447d9692ce19280c510f11afa0ac12fa.tar.bz2
sequelpro-16cf257c447d9692ce19280c510f11afa0ac12fa.zip
#2863 fix LHS table views when dragging a tab off a window
Diffstat (limited to 'Source/SPWindowControllerDelegate.m')
-rw-r--r--Source/SPWindowControllerDelegate.m11
1 files changed, 11 insertions, 0 deletions
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;
+ });
}
/**