[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51671] trunk/blender/source/blender/ windowmanager/intern/wm_event_system.c: The UI wasn' t capable of handling Double Click events; causing fast typing to

Ton Roosendaal ton at blender.org
Sat Oct 27 11:52:32 CEST 2012


Revision: 51671
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51671
Author:   ton
Date:     2012-10-27 09:52:26 +0000 (Sat, 27 Oct 2012)
Log Message:
-----------
The UI wasn't capable of handling Double Click events; causing fast typing to
not work.

This is a temporary fix to make button type work. I'll check on other cases
now too. 

Best would be to have UI code return correct flags for whether it has
done something or not. This hasn't been coded really - so that's a todo for
a later cleanup there.

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_event_system.c	2012-10-27 02:47:39 UTC (rev 51670)
+++ trunk/blender/source/blender/windowmanager/intern/wm_event_system.c	2012-10-27 09:52:26 UTC (rev 51671)
@@ -339,6 +339,11 @@
 	int is_wheel = ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE);
 	int retval;
 	
+	/* UI code doesn't handle return values - it just always returns break. 
+	   to make the DBL_CLICK conversion work, we just don't send this to UI */
+	if (event->val == KM_DBL_CLICK)
+		return WM_HANDLER_CONTINUE;
+	
 	/* UI is quite aggressive with swallowing events, like scrollwheel */
 	/* I realize this is not extremely nice code... when UI gets keymaps it can be maybe smarter */
 	if (do_wheel_ui == FALSE) {




More information about the Bf-blender-cvs mailing list