]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiWorkArea.cpp
Update the cursor shape also when the cursor shape changes without a mouse move actions.
[features.git] / src / frontends / qt4 / GuiWorkArea.cpp
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();
 }