The fix is inspired by the Georg's math_gridinset fix. As shown there, recordUndoInset has to be called instead of recordUndo when an action to multiple cells is to be recorded.
The patch fixes the behavior of cut, delete and paste in multiple cells. The question is: Are there some recordUndoInset calls missing? I can imagine that (some of) the tabular features need this too. Georg, do you have an idea? Unfortunately, the font changes are recorded atomically, since the font changes are applied one by one. Is there any possibility to group them? Regards, Jürgen
Index: insets/insettabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v retrieving revision 1.481 diff -p -u -r1.481 insettabular.C --- insets/insettabular.C 18 Jul 2005 17:12:28 -0000 1.481 +++ insets/insettabular.C 27 Jul 2005 20:32:51 -0000 @@ -621,7 +621,7 @@ void InsetTabular::doDispatch(LCursor & case LFUN_CUT: if (tablemode(cur)) { if (copySelection(cur)) { - recordUndo(cur, Undo::DELETE); + recordUndoInset(cur, Undo::DELETE); cutSelection(cur); } } @@ -632,8 +632,10 @@ void InsetTabular::doDispatch(LCursor & 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; @@ -720,7 +722,7 @@ void InsetTabular::doDispatch(LCursor & case LFUN_PASTE: if (hasPasteBuffer()) { - recordUndo(cur, Undo::INSERT); + recordUndoInset(cur, Undo::INSERT); pasteSelection(cur); break; }