Avoid warning message

This commit is contained in:
Marco Antognini 2013-09-21 14:24:59 +02:00
parent 00bc73f1f3
commit d77fce1b77

View File

@ -252,9 +252,10 @@
// custom OpenGL view. See -[SFOpenGLView sfKeyUp:] for more details. // custom OpenGL view. See -[SFOpenGLView sfKeyUp:] for more details.
id firstResponder = [[anEvent window] firstResponder]; id firstResponder = [[anEvent window] firstResponder];
if ([anEvent type] == NSKeyUp && [firstResponder respondsToSelector:@selector(sfKeyUp:)]) { if ([anEvent type] != NSKeyUp
[firstResponder sfKeyUp:anEvent]; || ![firstResponder tryToPerform:@selector(sfKeyUp:) with:anEvent]) {
} else { // It's either not a key up event or no responder has a sfKeyUp
// message implemented.
[super sendEvent:anEvent]; [super sendEvent:anEvent];
} }
} }