]> git.lyx.org Git - features.git/commitdiff
Update the cursor shape also when the cursor shape changes without a mouse move actions.
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 24 Oct 2010 22:14:31 +0000 (22:14 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 24 Oct 2010 22:14:31 +0000 (22:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35808 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/GuiWorkArea.h

index 667dd6f4fa6f328361b416f0b9f6c68f7257468d..b6480ffb11ede6d94c6bb6322d68e8a2952835db 100644 (file)
@@ -325,11 +325,20 @@ Qt::CursorShape GuiWorkArea::cursorShape() const
        return viewport()->cursor().shape();
 }
 
+
 void GuiWorkArea::setCursorShape(Qt::CursorShape shape)
 {
        viewport()->setCursor(shape);
 }
 
+
+void GuiWorkArea::updateCursorShape()
+{
+       setCursorShape(buffer_view_->clickableInset() 
+               ? Qt::PointingHandCursor : Qt::IBeamCursor);
+}
+
+
 void GuiWorkArea::setGuiView(GuiView & gv)
 {
        lyx_view_ = &gv;
@@ -458,6 +467,8 @@ void GuiWorkArea::redraw(bool update_metrics)
                buffer_view_->coordCache().dump();
 
        setReadOnly(buffer_view_->buffer().isReadonly());
+
+       updateCursorShape();
 }
 
 
@@ -528,8 +539,7 @@ void GuiWorkArea::dispatch(FuncRequest const & cmd0, KeyModifier mod)
                startBlinkingCursor();
        }
 
-       setCursorShape(buffer_view_->clickableInset() 
-               ? Qt::PointingHandCursor : Qt::IBeamCursor);
+       updateCursorShape();
 }
 
 
index a0fcf737860106bf8d3930b241a8605462968df1..34725ed424b976ca9ce650eb7534cc2a3cc7a1ec 100644 (file)
@@ -142,6 +142,8 @@ public:
        Qt::CursorShape cursorShape() const;
        void setCursorShape(Qt::CursorShape shape);
 
+       /// Change the cursor when the mouse hovers over a clickable inset
+       void updateCursorShape();
 
        /// Return the GuiView this workArea belongs to
        GuiView const & view() const { return *lyx_view_; }