]> git.lyx.org Git - features.git/commitdiff
fix undo in tabular cells (bug 1937, bug 1986)
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 15 Sep 2005 10:40:12 +0000 (10:40 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 15 Sep 2005 10:40:12 +0000 (10:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10442 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insettabular.C

index b1bae44276f6a0fdbc26324f7094abe8b76e8c51..236872e0c37c8ad5220276f567040e8b3214e5c3 100644 (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.
index dcf4669404c948b54cbdd758171630546067e514..c241a2219e4ef771aeac76ded9bdbc263786554f 100644 (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());