diff options
author | Max <post@wickenrode.com> | 2015-10-21 00:39:34 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-10-21 03:27:25 +0200 |
commit | b089a0d3249d3139bedc2679a36efa705d2bae04 (patch) | |
tree | df43a2984520b318f0b8c281d85f2defd72d3943 /Source/SPAppController.m | |
parent | 91abde0c94df8bd7f63bd4e5d062562b0827adbd (diff) | |
download | sequelpro-b089a0d3249d3139bedc2679a36efa705d2bae04.tar.gz sequelpro-b089a0d3249d3139bedc2679a36efa705d2bae04.tar.bz2 sequelpro-b089a0d3249d3139bedc2679a36efa705d2bae04.zip |
Fix bundle commands no longer working in popup field editor (and possibly other cases) (#2299)
Replacing some [NSApp mainWindow] with their actually intended calls [NSApp keyWindow] and [view window]
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r-- | Source/SPAppController.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 9ff2cad0..6489a76a 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -1966,7 +1966,7 @@ NSEvent *event = [NSApp currentEvent]; BOOL checkForKeyEquivalents = ([event type] == NSKeyDown) ? YES : NO; - id firstResponder = [[NSApp mainWindow] firstResponder]; + id firstResponder = [[NSApp keyWindow] firstResponder]; NSString *scope = [[sender representedObject] objectForKey:@"scope"]; NSString *keyEqKey = nil; @@ -2018,7 +2018,7 @@ NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; [aMenuItem setTag:0]; [aMenuItem setToolTip:[eq objectForKey:@"path"]]; - [(SPTextView *)[[NSApp mainWindow] firstResponder] executeBundleItemForInputField:aMenuItem]; + [(SPTextView *)firstResponder executeBundleItemForInputField:aMenuItem]; } } } else { @@ -2037,7 +2037,7 @@ NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; [aMenuItem setTag:0]; [aMenuItem setToolTip:[eq objectForKey:@"path"]]; - [(SPCopyTable *)[[NSApp mainWindow] firstResponder] executeBundleItemForDataTable:aMenuItem]; + [(SPCopyTable *)firstResponder executeBundleItemForDataTable:aMenuItem]; } } } else { |