[Bf-blender-cvs] [0f1d711] master: Fix T47830: Multi-edit w/ ui-list wont highlight
Campbell Barton
noreply at git.blender.org
Tue Mar 22 17:38:40 CET 2016
Commit: 0f1d711681dca29cf03fa3198aaa3cdceac0795f
Author: Campbell Barton
Date: Wed Mar 23 03:37:23 2016 +1100
Branches: master
https://developer.blender.org/rB0f1d711681dca29cf03fa3198aaa3cdceac0795f
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 90aeee7..9f01ae4 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -93,6 +93,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 f03e21a..841b76c 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