From: Edwin Leuven Date: Thu, 21 Dec 2006 21:27:04 +0000 (+0000) Subject: avoids updates on X-Git-Tag: 1.6.10~11466 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5ad83ced7c75b4f7d27ebf22ed7bcc49e06d0058;p=features.git 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 --- diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 849bf95079..e6622f593e 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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;