This message should be deleted in branch Jurgen.

Abdel.


[EMAIL PROTECTED] wrote:
Author: younes
Date: Wed Jun  4 09:15:43 2008
New Revision: 25112

URL: http://www.lyx.org/trac/changeset/25112
Log:
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 !


Modified:
    lyx-devel/trunk/src/insets/InsetInfo.cpp
    lyx-devel/trunk/src/insets/InsetInfo.h

Modified: lyx-devel/trunk/src/insets/InsetInfo.cpp
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetInfo.cpp?rev=25112
==============================================================================
--- lyx-devel/trunk/src/insets/InsetInfo.cpp (original)
+++ lyx-devel/trunk/src/insets/InsetInfo.cpp Wed Jun  4 09:15:43 2008
@@ -62,15 +62,17 @@
 void InsetInfo::draw(PainterInfo & pi, int x, int y) const
 {
InsetText::draw(pi, x, y); - if (mouse_hover_) {
-               odocstringstream os;
-               os << _("Information regarding ")
-                  <<_(nameTranslator().find(type_))
-                  << " " << from_utf8(name_);
-               pi.base.bv->message(os.str());
-       }
-}
-
+}
+
+
+docstring InsetInfo::toolTip(BufferView const & bv, int x, int y) const
+{
+       odocstringstream os;
+       os << _("Information regarding ")
+          << _(nameTranslator().find(type_))
+          << " " << from_utf8(name_);
+       return os.str();
+}
namespace {
Modified: lyx-devel/trunk/src/insets/InsetInfo.h
URL: 
http://www.lyx.org/trac/file/lyx-devel/trunk/src/insets/InsetInfo.h?rev=25112
==============================================================================
--- lyx-devel/trunk/src/insets/InsetInfo.h (original)
+++ lyx-devel/trunk/src/insets/InsetInfo.h Wed Jun  4 09:15:43 2008
@@ -106,6 +106,8 @@
        void updateInfo();
        ///
        bool setMouseHover(bool mouse_hover);
+       ///
+       docstring toolTip(BufferView const & bv, int x, int y) const;
private:
        /// The translator between the information type enum and corresponding 
string.




Reply via email to