diff options
author | Hans Goudey <h.goudey@me.com> | 2020-12-14 08:49:14 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-14 08:49:14 +0300 |
commit | fddbcb5757f6349ce1b11242fd760c1fb502a6a1 (patch) | |
tree | df38072701e9aa599575ab409500c2c0a0b5722a /source/blender/modifiers | |
parent | 260fca5d08e2f95e1b600a9c76a98dedd2541e10 (diff) |
UI: Click modifier icon to set active modifier
This should be a final piece of the changes for the active modifier
interface. Before, it was necessary to click on the blank space of a
modifier panel to set it active (not the header), this commit allows
clicking on the icon also.
The spacing with the spacing with the expand button would ideally
be a bit larger, but the layout system doesn't offer much flexibility
here.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_ui_common.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_ui_common.c b/source/blender/modifiers/intern/MOD_ui_common.c index fa5243c548f..55dbfdf478f 100644 --- a/source/blender/modifiers/intern/MOD_ui_common.c +++ b/source/blender/modifiers/intern/MOD_ui_common.c @@ -307,10 +307,16 @@ static void modifier_panel_header(const bContext *C, Panel *panel) /* Modifier Icon. */ sub = uiLayoutRow(layout, true); + uiLayoutSetEmboss(sub, UI_EMBOSS_NONE); if (mti->isDisabled && mti->isDisabled(scene, md, 0)) { uiLayoutSetRedAlert(sub, true); } - uiItemL(sub, "", RNA_struct_ui_icon(ptr->type)); + uiItemStringO(sub, + "", + RNA_struct_ui_icon(ptr->type), + "OBJECT_OT_modifier_set_active", + "modifier", + md->name); row = uiLayoutRow(layout, true); |