[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56776] trunk/blender/intern/ghost/intern/ GHOST_SystemCocoa.mm: Fix #35340: 3D manipulator not working right after undoing with cmd+Z on OS X.
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon May 13 23:19:30 CEST 2013
Revision: 56776
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56776
Author: blendix
Date: 2013-05-13 21:19:30 +0000 (Mon, 13 May 2013)
Log Message:
-----------
Fix #35340: 3D manipulator not working right after undoing with cmd+Z on OS X.
Another issue with the recent Ghost changes here. For some reason key up events
are not coming through when the command key is pressed. I can't figure out why,
for now just always handle them, still fixes the original bug.
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2013-05-13 20:42:18 UTC (rev 56775)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemCocoa.mm 2013-05-13 21:19:30 UTC (rev 56776)
@@ -939,12 +939,18 @@
// get keyDown events delivered to the view because they are
// special hotkeys to switch between views, so override directly
- if([event type] == NSKeyDown &&
+ if ([event type] == NSKeyDown &&
[event keyCode] == kVK_Tab &&
([event modifierFlags] & NSControlKeyMask)) {
handleKeyEvent(event);
}
else {
+ // For some reason NSApp is swallowing the key up events when command
+ // key is pressed, even if there seems to be no apparent reason to do
+ // so, as a workaround we always handle these up events.
+ if ([event type] == NSKeyUp && ([event modifierFlags] & NSCommandKeyMask))
+ handleKeyEvent(event);
+
[NSApp sendEvent:event];
}
More information about the Bf-blender-cvs
mailing list