edwin leuven wrote:
> there is too much drawing going on in tabulars
>
> avoids updates on
>
> 1. mouse click (without selection)
> 2. mouse movements (when selection doesn't change)
>
> esp 2 triggers a lot of redraws
the attached patch takes into account a possible depm update on
mouseclick as pointed out by jurgen
i think this should go in
Index: insets/insettabular.C
===================================================================
--- insets/insettabular.C (revision 16298)
+++ insets/insettabular.C (working copy)
@@ -498,6 +498,8 @@
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 @@
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;