Check to see if the object in doAction: is a controller, if and only if it's not, then don't call the should method

This commit is contained in:
Gregory John Casamento 2020-07-15 07:52:19 -04:00
parent f1a3e5dea6
commit dc9847fdea

View file

@ -176,7 +176,8 @@
- (IBAction) doAction: (id)sender
{
BOOL should = YES;
BOOL responds = [_sender respondsToSelector: @selector(shouldPerformSegueWithIdentifier:sender:)];
BOOL responds = [_sender respondsToSelector: @selector(shouldPerformSegueWithIdentifier:sender:)] &&
( [_sender isKindOfClass: [NSViewController class]] || [_sender isKindOfClass: [NSWindowController class]] );
if (responds)
{