From 2e1ba6d83711b15092cc5374879428b3a8689015 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 21 Sep 2006 10:43:49 +0000 Subject: [PATCH] * lyxfunc.C (getStatus): fix handling of LFUN_RUNCHKTEX (bug 2831) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15101 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/insettabular.C | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 66b4e4e9d6..b5af539eb9 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -754,27 +754,22 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) row_type rs, re; col_type cs, ce; getSelection(cur, rs, re, cs, ce); + LCursor tmpcur = cur; for (row_type i = rs; i <= re; ++i) { for (col_type j = cs; j <= ce; ++j) { // cursor follows cell: - cur.idx() = tabular.getCellNumber(i, j); + tmpcur.idx() = tabular.getCellNumber(i, j); // select this cell only: - cur.pos() = 0; - cur.resetAnchor(); - cur.pos() = cur.top().lastpos(); - cur.setCursor(cur); - cur.setSelection(); - cell(cur.idx())->dispatch(cur, cmd); + tmpcur.pit() = 0; + tmpcur.pos() = 0; + tmpcur.resetAnchor(); + tmpcur.pit() = tmpcur.lastpit(); + tmpcur.pos() = tmpcur.top().lastpos(); + tmpcur.setCursor(tmpcur); + tmpcur.setSelection(); + cell(tmpcur.idx())->dispatch(tmpcur, cmd); } } - // Restore original selection - cur.idx() = tabular.getCellNumber(rs, cs); - cur.pos() = 0; - cur.resetAnchor(); - cur.idx() = tabular.getCellNumber(re, ce); - cur.pos() = cur.top().lastpos(); - cur.setCursor(cur); - cur.setSelection(); break; } else { cell(cur.idx())->dispatch(cur, cmd);