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

Regression from 4d6b892.
This commit is contained in:
Campbell Barton 2016-03-23 03:37:23 +11:00
parent 84d8b35d6c
commit 0f1d711681
Notes: blender-bot 2023-02-14 08:05:24 +01:00
Referenced by issue #47830, Selecting multiple Shape Keys values doesn't highlight them during selection
2 changed files with 13 additions and 1 deletions

View File

@ -93,6 +93,7 @@ typedef enum {
/* specials */
UI_WTYPE_ICON,
UI_WTYPE_ICON_LABEL,
UI_WTYPE_SWATCH,
UI_WTYPE_RGB_PICKER,
UI_WTYPE_UNITVEC,

View File

@ -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);