Fixed: When closing a panel with escape, the delegates are not called

Previously, when closing a panel or popover with escape, the different delegates weren't called.
Now it does.
This commit is contained in:
Alexandre Wilhelm committed 2014-06-18 18:58:08 -07:00
1 parent ce86c757cd
commit 148f3172e6
1 file changed
+4 -3
+4 -3
View File
@@ -51,6 +51,7 @@
@class CPMenu
@class CPProgressIndicator
@class CPPanel
@class _CPPopoverWindow
@global CPApp
@@ -1798,14 +1799,14 @@ CPTexturedBackgroundWindowMask
}
else if ([anEvent charactersIgnoringModifiers] === CPEscapeFunctionKey && [self isKindOfClass:[CPPanel class]])
{
if ([self respondsToSelector:@selector(closeOnBlur)])
if ([self isKindOfClass:[_CPPopoverWindow class]])
{
if ([self closeOnBlur])
[self close];
[[self delegate] performClose:self];
}
else
{
[self close];
[self performClose:self];
}
return;