diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 0eed816e60..f0efce791a 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -76,6 +76,12 @@ void InsetBranch::read(Buffer const & buf, Lexer & lex) } +docstring InsetBranch::toolTip(BufferView const & bv, int x, int y) const +{ + return _("Branch: ") + params_.branch; +} + + void InsetBranch::setButtonLabel() { docstring s = _("Branch: ") + params_.branch; diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index 30305d8235..c62fbdd52b 100644 --- a/src/insets/InsetBranch.h +++ b/src/insets/InsetBranch.h @@ -84,6 +84,8 @@ public: virtual void updateLabels(Buffer const &, ParIterator const &); /// bool isMacroScope(Buffer const & buf) const; + /// + docstring toolTip(BufferView const & bv, int x, int y) const; protected: /// InsetBranch(InsetBranch const &); diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index c4d16de4ec..051c4ed769 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -103,7 +103,9 @@ InsetCollapsable::InsetCollapsable(InsetCollapsable const & rhs) docstring InsetCollapsable::toolTip(BufferView const & bv, int x, int y) const { Dimension dim = dimensionCollapsed(); - if (x > xo(bv) + dim.wid || y > yo(bv) + dim.des) + if (geometry() == NoButton) + return layout_->labelstring; + else if (x > xo(bv) + dim.wid || y > yo(bv) + dim.des) return docstring(); switch (status_) {