mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
avoids updates on
1. mouse click (without selection) 2. mouse movements (when selection doesn't change) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16373 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1e9f9be483
commit
5ad83ced7c
@ -498,6 +498,8 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
if (cmd.button() == mouse_button::button1
|
||||
|| (cmd.button() == mouse_button::button3
|
||||
&& (&bvcur.selBegin().inset() != this || !tablemode(bvcur)))) {
|
||||
if (!bvcur.selection() && !cur.bv().mouseSetCursor(cur))
|
||||
cur.noUpdate();
|
||||
cur.selection() = false;
|
||||
setCursorFromCoordinates(cur, cmd.x, cmd.y);
|
||||
cur.bv().mouseSetCursor(cur);
|
||||
@ -515,6 +517,10 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
if (cmd.button() == mouse_button::button1) {
|
||||
// only accept motions to places not deeper nested than the real anchor
|
||||
if (bvcur.anchor_.hasPart(cur)) {
|
||||
// only update if selection changes
|
||||
if (bvcur.idx() == cur.idx() &&
|
||||
!(bvcur.anchor_.idx() == cur.idx() && bvcur.pos() != cur.pos()))
|
||||
cur.noUpdate();
|
||||
setCursorFromCoordinates(cur, cmd.x, cmd.y);
|
||||
bvcur.setCursor(cur);
|
||||
bvcur.selection() = true;
|
||||
|
Loading…
Reference in New Issue
Block a user