From: Richard Kimberly Heck Date: Thu, 16 Nov 2023 19:03:34 +0000 (-0500) Subject: Fix layout names for branches. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=28e8bf742c89b2e4e1850f6d763c13d627a7667e;p=features.git Fix layout names for branches. --- diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 505871834f..af4140bcca 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -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 diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index 16e5524e23..e2b2958f18 100644 --- a/src/insets/InsetBranch.h +++ b/src/insets/InsetBranch.h @@ -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); }