From 67193e4e32bc6b6ecce0b7b7a5a4041fce07ce3c Mon Sep 17 00:00:00 2001 From: guishe Date: Wed, 7 Jun 2023 18:01:54 +0200 Subject: [PATCH] UI: Remove duplicate subsequent separators in Properties Navbar Tabs Remove duplicate subsequent separators between tabs in Properties Navbar Pull Request: https://projects.blender.org/blender/blender/pulls/107693 --- source/blender/makesrna/intern/rna_space.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0dd23cd89c8..b82a1a30e1d 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2047,13 +2047,18 @@ static const EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSE BLI_assert(totitem <= ARRAY_SIZE(context_tabs_array)); int totitem_added = 0; + bool add_separator = true; for (int i = 0; i < totitem; i++) { if (context_tabs_array[i] == -1) { - RNA_enum_item_add_separator(&item, &totitem_added); + if (add_separator) { + RNA_enum_item_add_separator(&item, &totitem_added); + add_separator = false; + } continue; } RNA_enum_items_add_value(&item, &totitem_added, buttons_context_items, context_tabs_array[i]); + add_separator = true; /* Add the object data icon dynamically for the data tab. */ if (context_tabs_array[i] == BCONTEXT_DATA) {