mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-14 12:25:11 +00:00
Cosmetics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22833 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9bdca85f26
commit
6a082a6d89
@ -603,7 +603,7 @@ void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
|
|||||||
// we kill the triple click if we move
|
// we kill the triple click if we move
|
||||||
doubleClickTimeout();
|
doubleClickTimeout();
|
||||||
FuncRequest cmd(LFUN_MOUSE_MOTION, e->x(), e->y(),
|
FuncRequest cmd(LFUN_MOUSE_MOTION, e->x(), e->y(),
|
||||||
q_motion_state(e->buttons()));
|
q_motion_state(e->buttons()));
|
||||||
|
|
||||||
// If we're above or below the work area...
|
// If we're above or below the work area...
|
||||||
if (e->y() <= 20 || e->y() >= viewport()->height() - 20) {
|
if (e->y() <= 20 || e->y() >= viewport()->height() - 20) {
|
||||||
@ -626,11 +626,10 @@ void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
|
|||||||
// occurred after the one used to start the timeout
|
// occurred after the one used to start the timeout
|
||||||
// in the first place.
|
// in the first place.
|
||||||
return;
|
return;
|
||||||
else {
|
|
||||||
synthetic_mouse_event_.restart_timeout = true;
|
synthetic_mouse_event_.restart_timeout = true;
|
||||||
synthetic_mouse_event_.timeout.start();
|
synthetic_mouse_event_.timeout.start();
|
||||||
// Fall through to handle this event...
|
// Fall through to handle this event...
|
||||||
}
|
|
||||||
|
|
||||||
} else if (synthetic_mouse_event_.timeout.running()) {
|
} else if (synthetic_mouse_event_.timeout.running()) {
|
||||||
// Store the event, to be possibly handled when the timeout
|
// Store the event, to be possibly handled when the timeout
|
||||||
@ -647,17 +646,20 @@ void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
|
|||||||
// Has anything changed on-screen since the last QMouseEvent
|
// Has anything changed on-screen since the last QMouseEvent
|
||||||
// was received?
|
// was received?
|
||||||
double const scrollbar_value = verticalScrollBar()->value();
|
double const scrollbar_value = verticalScrollBar()->value();
|
||||||
if (e->x() != synthetic_mouse_event_.x_old ||
|
if (e->x() == synthetic_mouse_event_.x_old
|
||||||
e->y() != synthetic_mouse_event_.y_old ||
|
&& e->y() == synthetic_mouse_event_.y_old
|
||||||
scrollbar_value != synthetic_mouse_event_.scrollbar_value_old) {
|
&& scrollbar_value == synthetic_mouse_event_.scrollbar_value_old) {
|
||||||
// Yes it has. Store the params used to check this.
|
// Nothing changed on-screen since the last QMouseEvent.
|
||||||
synthetic_mouse_event_.x_old = e->x();
|
return;
|
||||||
synthetic_mouse_event_.y_old = e->y();
|
|
||||||
synthetic_mouse_event_.scrollbar_value_old = scrollbar_value;
|
|
||||||
|
|
||||||
// ... and dispatch the event to the LyX core.
|
|
||||||
dispatch(cmd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Yes something has changed. Store the params used to check this.
|
||||||
|
synthetic_mouse_event_.x_old = e->x();
|
||||||
|
synthetic_mouse_event_.y_old = e->y();
|
||||||
|
synthetic_mouse_event_.scrollbar_value_old = scrollbar_value;
|
||||||
|
|
||||||
|
// ... and dispatch the event to the LyX core.
|
||||||
|
dispatch(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user