From bd7cb42f3d4c9c9a79fdfce4f2cc1ac54cd8b765 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Mon, 29 Oct 2018 17:49:26 +0100 Subject: GP: Remove unneeded code to get icon Test the object type is not good idea here. --- source/blender/editors/space_buttons/buttons_context.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source/blender/editors/space_buttons') diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index c4756e1635d..04948fd6984 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -646,13 +646,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts) sbuts->dataicon = RNA_struct_ui_icon(ptr->type); } else { - Object *ob = CTX_data_active_object(C); - if (ob->type == OB_GPENCIL) { - sbuts->dataicon = ICON_GREASEPENCIL; - } - else { - sbuts->dataicon = ICON_EMPTY_DATA; - } + sbuts->dataicon = ICON_EMPTY_DATA; } } } -- cgit v1.2.3