From 835c353aaa475511d2b5d955be74d4bee9031692 Mon Sep 17 00:00:00 2001 From: Elia Sarti Date: Sun, 21 Feb 2010 22:55:35 +0000 Subject: [PATCH] Fix for #21209, Delete X for particle settings does nothing. Disable ID default unlink button if the RNA property is set to never be null, as the unlink default action simply sets pointers to null --- source/blender/editors/interface/interface_templates.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 4c818f9d0ac..313e7b67183 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -449,6 +449,9 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str else { but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE)); + + if(RNA_property_flag(template->prop) & PROP_NEVER_NULL) + uiButSetFlag(but, UI_BUT_DISABLED); } if((idfrom && idfrom->lib))