diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPDatabaseDocument.h | 2 | ||||
-rw-r--r-- | Source/SPWindowControllerDelegate.m | 11 |
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; + }); } /** |