Commit: 1cbe85b156b318ee7d7445085c5b2af2212c0cfe
Author: Campbell Barton
Date:   Thu Jul 24 16:53:10 2014 +1000
Branches: master
https://developer.blender.org/rB1cbe85b156b318ee7d7445085c5b2af2212c0cfe

UI: prevent dragging a popup from activating a button

===================================================================

M       source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c 
b/source/blender/editors/interface/interface_handlers.c
index 0a1be6b..a26c8db 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -7906,6 +7906,7 @@ static int ui_handle_menu_event(
        if (menu->is_grab) {
                if (event->type == LEFTMOUSE) {
                        menu->is_grab = false;
+                       retval = WM_UI_HANDLER_BREAK;
                }
                else {
                        if (event->type == MOUSEMOVE) {
@@ -8263,9 +8264,10 @@ static int ui_handle_menu_event(
                        else if ((event->type == LEFTMOUSE) && (event->val == 
KM_PRESS) &&
                                 (inside && is_floating && inside_title))
                        {
-                               if (!ui_but_find_activated(ar)) {
+                               if (!but || !ui_mouse_inside_button(ar, but, 
event->x, event->y)) {
                                        menu->is_grab = true;
                                        copy_v2_v2_int(menu->grab_xy_prev, 
&event->x);
+                                       retval = WM_UI_HANDLER_BREAK;
                                }
                        }
 #endif

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to