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); }