fix undo in tabular cells (bug 1937, bug 1986)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10442 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2005-09-15 10:40:12 +00:00
parent fdd388d4b7
commit 36881fc272
2 changed files with 12 additions and 6 deletions

View File

@ -1,9 +1,14 @@
2005-09-11 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* insettabular.C: use recordUndoInset instead of recordUndo
(fixes bug 1937 and 1986).
2005-09-12 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* insetvspace.C (metrics): include label text
* insetvspace.[Ch] (label): new, needed for the above
2005-08-10 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
2005-09-10 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* insetbase.[Ch]: new bool neverIndent() which indicates if
an inset does not want paragraph indentation at all.

View File

@ -631,7 +631,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_CUT:
if (tablemode(cur)) {
if (copySelection(cur)) {
recordUndo(cur, Undo::DELETE);
recordUndoInset(cur, Undo::DELETE);
cutSelection(cur);
}
}
@ -641,9 +641,10 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_BACKSPACE:
case LFUN_DELETE:
recordUndo(cur, Undo::DELETE);
if (tablemode(cur))
if (tablemode(cur)) {
recordUndoInset(cur, Undo::DELETE);
cutSelection(cur);
}
else
cell(cur.idx())->dispatch(cur, cmd);
break;
@ -730,7 +731,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_PASTE:
if (hasPasteBuffer() && tabularStackDirty()) {
recordUndo(cur, Undo::INSERT);
recordUndoInset(cur, Undo::INSERT);
pasteSelection(cur);
break;
}
@ -1403,7 +1404,7 @@ void InsetTabular::tabularFeatures(LCursor & cur,
break;
}
recordUndo(cur, Undo::ATOMIC);
recordUndoInset(cur, Undo::ATOMIC);
getSelection(cur, sel_row_start, sel_row_end, sel_col_start, sel_col_end);
row_type const row = tabular.row_of_cell(cur.idx());