[Bf-blender-cvs] [4132ca1] master: UI: show check-boxes pie-menu bool/enums

Campbell Barton noreply at git.blender.org
Fri Feb 13 01:33:38 CET 2015


Commit: 4132ca1ac2ebb590aae224b06ea8a76a674e39f6
Author: Campbell Barton
Date:   Fri Feb 13 11:32:24 2015 +1100
Branches: master
https://developer.blender.org/rB4132ca1ac2ebb590aae224b06ea8a76a674e39f6

UI: show check-boxes pie-menu bool/enums

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

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 fb73b8e..2513acc 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -1236,7 +1236,8 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
 		name = ui_item_name_add_colon(name, namestr);
 	}
 
-	if (layout->root->type == UI_LAYOUT_MENU) {
+	/* menus and pie-menus don't show checkbox without this */
+	if (ELEM(layout->root->type, UI_LAYOUT_MENU, UI_LAYOUT_PIEMENU)) {
 		if (type == PROP_BOOLEAN && ((is_array == false) || (index != RNA_NO_INDEX))) {
 			if (is_array) icon = (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
 			else icon = (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;




More information about the Bf-blender-cvs mailing list