From ac0a12de6840fe52b51cf329d4a052308cd473ab Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Thu, 16 Nov 2023 20:16:28 -0500 Subject: [PATCH] Let label strings work with branches. A better patch will be attached to bug #12974. --- src/insets/InsetBranch.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index af4140bcca..2118a6f947 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -21,6 +21,7 @@ #include "DispatchResult.h" #include "FuncRequest.h" #include "FuncStatus.h" +#include "Inset.h" #include "Lexer.h" #include "LyX.h" #include "output_docbook.h" @@ -117,6 +118,10 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const if (decoration() == InsetDecoration::MINIMALISTIC) return symb + inv_symb + params_.branch; + InsetLayout const & il = getLayout(); + docstring const & label_string = il.labelstring(); + if (!label_string.empty()) + return symb + inv_symb + label_string; docstring s; if (inmaster && inchild) s = _("Branch: "); -- 2.39.5