diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-10-23 02:33:47 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-10-23 02:33:47 +0300 |
commit | fe7088c99ff084f7218ab20136d49eb1a1dccd0b (patch) | |
tree | 3b3df4270110bbffa4a738e379dce5319fec9653 /source/blender/editors/interface/interface_context_path.cc | |
parent | b5a69061e7d464914662ae0dd6fed46a999a56bb (diff) | |
parent | b70bbfadfecec049ad1ac2de7a949198ca6c15bc (diff) |
Merge remote-tracking branch 'origin' into temp-sculpt-brush-channel
Diffstat (limited to 'source/blender/editors/interface/interface_context_path.cc')
-rw-r--r-- | source/blender/editors/interface/interface_context_path.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_context_path.cc b/source/blender/editors/interface/interface_context_path.cc index e8f552e26a3..91b2f9613de 100644 --- a/source/blender/editors/interface/interface_context_path.cc +++ b/source/blender/editors/interface/interface_context_path.cc @@ -17,6 +17,8 @@ #include "UI_interface.hh" #include "UI_resources.h" +#include "RNA_prototypes.h" + #include "WM_api.h" namespace blender::ui { @@ -41,7 +43,13 @@ void context_path_add_generic(Vector<ContextPathItem> &path, static_cast<BIFIconID>(RNA_struct_ui_icon(rna_ptr.type)) : icon_override; - path.append({name, int(icon)}); + if (&rna_type == &RNA_NodeTree) { + ID *id = (ID *)ptr; + path.append({name, int(icon), id->us}); + } + else { + path.append({name, int(icon), 1}); + } } /* -------------------------------------------------------------------- */ @@ -60,7 +68,9 @@ void template_breadcrumbs(uiLayout &layout, Span<ContextPathItem> context_path) if (i > 0) { uiItemL(sub_row, "", ICON_RIGHTARROW_THIN); } - uiItemL(sub_row, context_path[i].name.c_str(), context_path[i].icon); + uiBut *but = uiItemL_ex( + sub_row, context_path[i].name.c_str(), context_path[i].icon, false, false); + UI_but_icon_indicator_number_set(but, context_path[i].icon_indicator_number); } } |