[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33791] trunk/blender/source/blender/ editors/interface/interface_handlers.c: Todo item: (Luca report in IRC)

Ton Roosendaal ton at blender.org
Sun Dec 19 15:39:36 CET 2010


Revision: 33791
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33791
Author:   ton
Date:     2010-12-19 15:39:36 +0100 (Sun, 19 Dec 2010)

Log Message:
-----------
Todo item: (Luca report in IRC)

Pulldown and other popup menus: this button type exits on release.
While holding mouse you then can move around, but the highlight of button
didn't disappear if you were outside item. The menu then doesn't close
when you release the mouse.
Now highlight goes on/off on mouse moves to show this better.

Implementation note: menu items are coded similar to regular activate
buttons (like for tools). There's no provision to make highlights go
to the next item while holding mouse in menus. That I rather not mess
with now.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c	2010-12-19 14:07:50 UTC (rev 33790)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c	2010-12-19 14:39:36 UTC (rev 33791)
@@ -5196,16 +5196,17 @@
 				}
 				else {
 					/* deselect the button when moving the mouse away */
+					/* also de-activate for buttons that only show higlights */
 					if(ui_mouse_inside_button(ar, but, event->x, event->y)) {
 						if(!(but->flag & UI_SELECT)) {
-							but->flag |= UI_SELECT;
+							but->flag |= (UI_SELECT|UI_ACTIVE);
 							data->cancel= 0;
 							ED_region_tag_redraw(data->region);
 						}
 					}
 					else {
 						if(but->flag & UI_SELECT) {
-							but->flag &= ~UI_SELECT;
+							but->flag &= ~(UI_SELECT|UI_ACTIVE);
 							data->cancel= 1;
 							ED_region_tag_redraw(data->region);
 						}





More information about the Bf-blender-cvs mailing list