mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Update the cursor shape also when the cursor shape changes without a mouse move actions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35808 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0590c77d47
commit
1a9fe125f6
@ -325,11 +325,20 @@ Qt::CursorShape GuiWorkArea::cursorShape() const
|
|||||||
return viewport()->cursor().shape();
|
return viewport()->cursor().shape();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiWorkArea::setCursorShape(Qt::CursorShape shape)
|
void GuiWorkArea::setCursorShape(Qt::CursorShape shape)
|
||||||
{
|
{
|
||||||
viewport()->setCursor(shape);
|
viewport()->setCursor(shape);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiWorkArea::updateCursorShape()
|
||||||
|
{
|
||||||
|
setCursorShape(buffer_view_->clickableInset()
|
||||||
|
? Qt::PointingHandCursor : Qt::IBeamCursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiWorkArea::setGuiView(GuiView & gv)
|
void GuiWorkArea::setGuiView(GuiView & gv)
|
||||||
{
|
{
|
||||||
lyx_view_ = &gv;
|
lyx_view_ = &gv;
|
||||||
@ -458,6 +467,8 @@ void GuiWorkArea::redraw(bool update_metrics)
|
|||||||
buffer_view_->coordCache().dump();
|
buffer_view_->coordCache().dump();
|
||||||
|
|
||||||
setReadOnly(buffer_view_->buffer().isReadonly());
|
setReadOnly(buffer_view_->buffer().isReadonly());
|
||||||
|
|
||||||
|
updateCursorShape();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -528,8 +539,7 @@ void GuiWorkArea::dispatch(FuncRequest const & cmd0, KeyModifier mod)
|
|||||||
startBlinkingCursor();
|
startBlinkingCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
setCursorShape(buffer_view_->clickableInset()
|
updateCursorShape();
|
||||||
? Qt::PointingHandCursor : Qt::IBeamCursor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -142,6 +142,8 @@ public:
|
|||||||
Qt::CursorShape cursorShape() const;
|
Qt::CursorShape cursorShape() const;
|
||||||
void setCursorShape(Qt::CursorShape shape);
|
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
|
/// Return the GuiView this workArea belongs to
|
||||||
GuiView const & view() const { return *lyx_view_; }
|
GuiView const & view() const { return *lyx_view_; }
|
||||||
|
Loading…
Reference in New Issue
Block a user