From: Georg Baum Date: Fri, 8 Jul 2005 09:12:34 +0000 (+0000) Subject: fix undo in grids X-Git-Tag: 1.6.10~14164 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e87254ab129eb1d12fc7c2384d663b1a927905e0;p=features.git fix undo in grids git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10149 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index bf6420f5de..229ecc5778 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2005-07-07 Georg Baum + + * math_gridinset.C (doDispatch): use recordUndoInset when more than + one cell is changed + 2005-07-06 Georg Baum * math_gridinset.C (doDispatch): better fix for the assertion diff --git a/src/mathed/math_gridinset.C b/src/mathed/math_gridinset.C index 4946fdf576..ccb4efade1 100644 --- a/src/mathed/math_gridinset.C +++ b/src/mathed/math_gridinset.C @@ -1040,7 +1040,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd) // insert file functions case LFUN_DELETE_LINE_FORWARD: - recordUndo(cur); + recordUndoInset(cur); //autocorrect_ = false; //macroModeClose(); //if (selection_) { @@ -1061,7 +1061,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd) break; case LFUN_BREAKLINE: { - recordUndo(cur); + recordUndoInset(cur); row_type const r = cur.row(); addRow(r); @@ -1082,7 +1082,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd) } case LFUN_TABULAR_FEATURE: { - recordUndo(cur); + recordUndoInset(cur); //lyxerr << "handling tabular-feature " << cmd.argument << endl; istringstream is(cmd.argument); string s; @@ -1172,7 +1172,6 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd) } case LFUN_PASTE: { - recordUndo(cur); lyxerr << "MathGridInset: PASTE: " << cmd << std::endl; istringstream is(cmd.argument); int n = 0; @@ -1181,10 +1180,12 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd) mathed_parse_normal(grid, lyx::cap::getSelection(cur.buffer(), n)); if (grid.nargs() == 1) { // single cell/part of cell + recordUndo(cur); cur.cell().insert(cur.pos(), grid.cell(0)); cur.pos() += grid.cell(0).size(); } else { // multiple cells + recordUndoInset(cur); col_type const numcols = min(grid.ncols(), ncols() - col(cur.idx())); row_type const numrows = @@ -1316,7 +1317,7 @@ bool MathGridInset::getStatus(LCursor & cur, FuncRequest const & cmd, #if 0 // FIXME: What did this code do? - // Please check wether it is still needed! + // Please check whether it is still needed! // should be more precise if (v_align_ == '\0') { flag.enable(true);