docstring InsetFloat::toolTip(BufferView const & bv, int x, int y) const
{
- if (InsetCollapsable::toolTip(bv, x, y).empty())
+ if (InsetCollapsable::toolTip(bv, x, y).empty() || isOpen())
return docstring();
- docstring default_tip;
- if (isOpen())
- default_tip = _("Left-click to collapse the inset");
- else
- default_tip = _("Left-click to open the inset");
OutputParams rp(&buffer().params().encoding());
- docstring caption_tip = getCaptionText(rp);
- if (!isOpen() && !caption_tip.empty())
- return caption_tip + '\n' + default_tip;
- return default_tip;
+ return getCaptionText(rp);
}