mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 14:04:25 +00:00
Fix crash while InsetInfo hovering by replacing the hover message with a tooltip.
Note to all: NEVER send a message inside a draw() method! This triggers a recursive painting of the status bar with Qt4.4 ! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25112 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9d469100d0
commit
4f2a7a953b
@ -62,15 +62,17 @@ Inset * InsetInfo::editXY(Cursor &, int, int)
|
|||||||
void InsetInfo::draw(PainterInfo & pi, int x, int y) const
|
void InsetInfo::draw(PainterInfo & pi, int x, int y) const
|
||||||
{
|
{
|
||||||
InsetText::draw(pi, x, y);
|
InsetText::draw(pi, x, y);
|
||||||
if (mouse_hover_) {
|
}
|
||||||
|
|
||||||
|
|
||||||
|
docstring InsetInfo::toolTip(BufferView const & bv, int x, int y) const
|
||||||
|
{
|
||||||
odocstringstream os;
|
odocstringstream os;
|
||||||
os << _("Information regarding ")
|
os << _("Information regarding ")
|
||||||
<< _(nameTranslator().find(type_))
|
<< _(nameTranslator().find(type_))
|
||||||
<< " " << from_utf8(name_);
|
<< " " << from_utf8(name_);
|
||||||
pi.base.bv->message(os.str());
|
return os.str();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -106,6 +106,8 @@ public:
|
|||||||
void updateInfo();
|
void updateInfo();
|
||||||
///
|
///
|
||||||
bool setMouseHover(bool mouse_hover);
|
bool setMouseHover(bool mouse_hover);
|
||||||
|
///
|
||||||
|
docstring toolTip(BufferView const & bv, int x, int y) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// The translator between the information type enum and corresponding string.
|
/// The translator between the information type enum and corresponding string.
|
||||||
|
Loading…
Reference in New Issue
Block a user