[Bf-blender-cvs] [029bc90] UI-graphical-redesign: Fix panels being highlighted while dragging another panel over them

Julian Eisel noreply at git.blender.org
Wed Jun 3 17:03:54 CEST 2015


Commit: 029bc907dd04ef2eca559e3949caeba936895a49
Author: Julian Eisel
Date:   Wed Jun 3 12:54:09 2015 +0200
Branches: UI-graphical-redesign
https://developer.blender.org/rB029bc907dd04ef2eca559e3949caeba936895a49

Fix panels being highlighted while dragging another panel over them

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

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

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

diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 175799d..11ed859 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1989,6 +1989,16 @@ int ui_handler_panel_region(bContext *C, const wmEvent *event, ARegion *ar)
 		}
 	}
 
+	/* do a first iteration over all panels to see if we have one that is already being dragged */
+	for (block = ar->uiblocks.last; block; block = block->prev) {
+		if (block->panel && block->panel->flag & PNL_SELECT) {
+			/* don't handle any further interaction while a panel
+			 * is dragged (which is handled separately) */
+			retval = WM_UI_HANDLER_BREAK;
+			break;
+		}
+	}
+
 	if (retval == WM_UI_HANDLER_BREAK) {
 		return retval;
 	}




More information about the Bf-blender-cvs mailing list