[Bf-blender-cvs] [324e24ee38e] master: Fix layout.prop invert_checkbox not working combined with icons
Brecht Van Lommel
noreply at git.blender.org
Mon Mar 9 17:12:08 CET 2020
Commit: 324e24ee38e4ccc7d9014cde3f83637602ec293d
Author: Brecht Van Lommel
Date: Mon Mar 9 16:43:47 2020 +0100
Branches: master
https://developer.blender.org/rB324e24ee38e4ccc7d9014cde3f83637602ec293d
Fix layout.prop invert_checkbox not working combined with icons
Contributed by Valentin (Poulpator).
Differential Revision: https://developer.blender.org/D7027
===================================================================
M source/blender/editors/interface/interface_layout.c
===================================================================
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index dd002f4e77f..1aa2670942f 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2183,7 +2183,11 @@ void uiItemFullR(uiLayout *layout,
}
if (flag & UI_ITEM_R_CHECKBOX_INVERT) {
- if (ELEM(but->type, UI_BTYPE_CHECKBOX, UI_BTYPE_CHECKBOX_N)) {
+ if (ELEM(but->type,
+ UI_BTYPE_CHECKBOX,
+ UI_BTYPE_CHECKBOX_N,
+ UI_BTYPE_ICON_TOGGLE,
+ UI_BTYPE_ICON_TOGGLE_N)) {
but->drawflag |= UI_BUT_CHECKBOX_INVERT;
}
}
More information about the Bf-blender-cvs
mailing list