mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 11:40:47 +00:00
When looking for the target for an action, if the key window is associated
with a document, return it git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16575 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
adc4a725ed
commit
6942ad64d5
1 changed files with 13 additions and 1 deletions
|
@ -1581,7 +1581,7 @@ Returns the target object that will respond to aSelector, if any. The
|
|||
method first checks if any of the key window's first responders, the
|
||||
key window or its delegate responds. Next it checks the main window in
|
||||
the same way. Finally it checks the receiver (NSApplication) and it's
|
||||
delegate.
|
||||
delegate.
|
||||
</p>
|
||||
*/
|
||||
- (id) targetForAction: (SEL)aSelector
|
||||
|
@ -1606,11 +1606,23 @@ delegate.
|
|||
{
|
||||
return keyWindow;
|
||||
}
|
||||
|
||||
resp = [keyWindow delegate];
|
||||
if (resp != nil && [resp respondsToSelector: aSelector])
|
||||
{
|
||||
return resp;
|
||||
}
|
||||
|
||||
if ([NSDocumentController isDocumentBasedApplication])
|
||||
{
|
||||
resp = [[NSDocumentController sharedDocumentController]
|
||||
documentForWindow: keyWindow];
|
||||
|
||||
if (resp != nil && [resp respondsToSelector: aSelector])
|
||||
{
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_session != 0)
|
||||
|
|
Loading…
Reference in a new issue