[Bf-blender-cvs] [f601a4b] blender-v2.77-release: Fix T47830: Multi-edit w/ ui-list wont highlight

Campbell Barton noreply at git.blender.org
Tue Apr 5 10:38:06 CEST 2016


Commit: f601a4b4f7b03db090d4009b0484a6675ac5b81b
Author: Campbell Barton
Date:   Wed Mar 23 03:37:23 2016 +1100
Branches: blender-v2.77-release
https://developer.blender.org/rBf601a4b4f7b03db090d4009b0484a6675ac5b81b

Fix T47830: Multi-edit w/ ui-list wont highlight

Regression from 4d6b892.

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

M	source/blender/editors/interface/interface_intern.h
M	source/blender/editors/interface/interface_widgets.c

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

diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 66510fb..d828c4e 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -92,6 +92,7 @@ typedef enum {
 
 	/* specials */
 	UI_WTYPE_ICON,
+	UI_WTYPE_ICON_LABEL,
 	UI_WTYPE_SWATCH,
 	UI_WTYPE_RGB_PICKER,
 	UI_WTYPE_UNITVEC,
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 5898f3b..21ff857 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -3499,6 +3499,10 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
 			
 		/* specials */
 		case UI_WTYPE_ICON:
+			wt.custom = widget_icon_has_anim;
+			break;
+
+		case UI_WTYPE_ICON_LABEL:
 			/* behave like regular labels (this is simply a label with an icon) */
 			wt.state = widget_state_label;
 			wt.custom = widget_icon_has_anim;
@@ -3628,7 +3632,14 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
 	}
 	else if (but->dt == UI_EMBOSS_NONE) {
 		/* "nothing" */
-		wt = widget_type(UI_WTYPE_ICON);
+		switch (but->type) {
+			case UI_BTYPE_LABEL:
+				wt = widget_type(UI_WTYPE_ICON_LABEL);
+				break;
+			default:
+				wt = widget_type(UI_WTYPE_ICON);
+				break;
+		}
 	}
 	else if (but->dt == UI_EMBOSS_RADIAL) {
 		wt = widget_type(UI_WTYPE_MENU_ITEM_RADIAL);




More information about the Bf-blender-cvs mailing list