Permalink
Browse files

Fix first responder exception being logged on 10.12. Check if the fav…

…ourites outline view is attached to a window before setting it as the first responder.
  • Loading branch information...
stuconnolly committed Mar 30, 2017
1 parent 9527a67 commit 63eb8781018c094644bc1d46099b42ad27f51670
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/SPDatabaseDocument.m
@@ -4479,10 +4479,10 @@ - (void)tabDidResize
*/
- (void)setParentWindow:(NSWindow *)window
{
NSWindow *outlineViewWindow = [(NSView *)[connectionController favoritesOutlineView] window];
NSWindow *favoritesOutlineViewWindow = [(NSView *)[connectionController favoritesOutlineView] window];
// If the window is being set for the first time - connection controller is visible - update focus
if (!parentWindow && !mySQLConnection && window == outlineViewWindow) {
if (!parentWindow && !mySQLConnection && window == favoritesOutlineViewWindow) {
[window makeFirstResponder:(NSResponder *)[connectionController favoritesOutlineView]];
}

0 comments on commit 63eb878

Please sign in to comment.