diff options
author | Max <post@wickenrode.com> | 2015-06-29 21:48:08 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-06-29 21:48:08 +0200 |
commit | 12cca5f3cb1b27180512f0ed7a2ced63b81a58d7 (patch) | |
tree | c097cc9cc391a53ee032a6b360dde68a0ecbcb94 /Source/SPQueryFavoriteManager.m | |
parent | 0bfc0776d1d66f3eb8ac3eb21a8868e095c1c5e6 (diff) | |
download | sequelpro-12cca5f3cb1b27180512f0ed7a2ced63b81a58d7.tar.gz sequelpro-12cca5f3cb1b27180512f0ed7a2ced63b81a58d7.tar.bz2 sequelpro-12cca5f3cb1b27180512f0ed7a2ced63b81a58d7.zip |
Removing a query favorite via its context menu would cause an exception (fixes #2161)
Diffstat (limited to 'Source/SPQueryFavoriteManager.m')
-rw-r--r-- | Source/SPQueryFavoriteManager.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m index a715bd93..3738fe0d 100644 --- a/Source/SPQueryFavoriteManager.m +++ b/Source/SPQueryFavoriteManager.m @@ -255,9 +255,10 @@ */ - (IBAction)removeQueryFavorite:(id)sender { - + //sender can be a NSButton or a NSMenuItem + // Complete editing in the window - [[sender window] makeFirstResponder:[sender window]]; + [[self window] makeFirstResponder:[self window]]; NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove selected query favorites?", @"remove selected query favorites message") defaultButton:NSLocalizedString(@"Remove", @"remove button") |