]> git.lyx.org Git - features.git/commitdiff
Fix layout names for branches.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 16 Nov 2023 19:03:34 +0000 (14:03 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 17 Nov 2023 01:05:38 +0000 (20:05 -0500)
src/insets/InsetBranch.cpp
src/insets/InsetBranch.h

index 505871834fa5c1615360269768a76f71117edff8..af4140bccab31f06956211824b30403e404300d3 100644 (file)
@@ -338,6 +338,14 @@ string InsetBranch::contextMenuName() const
 }
 
 
+docstring InsetBranch::layoutName() const
+{
+       docstring const name = support::subst(branch(), '_', ' ');
+       return from_ascii("Branch:") + name;
+}
+
+
+
 bool InsetBranch::isMacroScope() const
 {
        // Its own scope if not selected by buffer
index 16e5524e236c86e22bdef8bbb32df0b129fe4d68..e2b2958f18f5121a02e4d6eadb1d94968ef02bc8 100644 (file)
@@ -114,7 +114,7 @@ private:
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd) override;
        ///
-       docstring layoutName() const override { return from_ascii("Branch:") + branch(); }
+       docstring layoutName() const override;
        ///
        Inset * clone() const override { return new InsetBranch(*this); }