From: Jean-Marc Date: Sat, 19 Jul 2014 22:50:24 +0000 (+0200) Subject: Fix bad use of undo kind in Tabular inset. X-Git-Tag: 2.2.0alpha1~1762 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1fefbf5bdcb9b7c9f163280ed8eeaff2b1271bd5;p=lyx.git Fix bad use of undo kind in Tabular inset. --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index f7f0d2419b..8a8c2129f6 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -4303,7 +4303,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) FileName(to_utf8(cmd.argument()))); if (tmpstr.empty()) break; - cur.recordUndoInset(INSERT_UNDO); + cur.recordUndoInset(); if (insertPlaintextString(cur.bv(), tmpstr, false)) { // content has been replaced, // so cursor might be invalid @@ -4318,7 +4318,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CUT: if (cur.selIsMultiCell()) { if (copySelection(cur)) { - cur.recordUndoInset(DELETE_UNDO); + cur.recordUndoInset(); cutSelection(cur); } } else @@ -4327,7 +4327,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_SELF_INSERT: if (cur.selIsMultiCell()) { - cur.recordUndoInset(DELETE_UNDO); + cur.recordUndoInset(); cutSelection(cur); BufferView * bv = &cur.bv(); docstring::const_iterator cit = cmd.argument().begin(); @@ -4344,7 +4344,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_CHAR_DELETE_BACKWARD: case LFUN_CHAR_DELETE_FORWARD: if (cur.selIsMultiCell()) { - cur.recordUndoInset(DELETE_UNDO); + cur.recordUndoInset(); cutSelection(cur); } else cell(cur.idx())->dispatch(cur, cmd); @@ -4370,7 +4370,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) // pass to InsertPlaintextString, but // only if we have multi-cell content if (clip.find_first_of(from_ascii("\t\n")) != docstring::npos) { - cur.recordUndoInset(INSERT_UNDO); + cur.recordUndoInset(); if (insertPlaintextString(cur.bv(), clip, false)) { // content has been replaced, // so cursor might be invalid @@ -4392,7 +4392,7 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd) break; } if (theClipboard().isInternal()) { - cur.recordUndoInset(INSERT_UNDO); + cur.recordUndoInset(); pasteClipboard(cur); } break;