]> git.lyx.org Git - lyx.git/blobdiff - src/undo.C
the spellcheck cleanup
[lyx.git] / src / undo.C
index 44524212f55873b0926080c91c6346cac4670119..e62cb065246e5c4608454673d54035bd089c7505 100644 (file)
@@ -184,9 +184,11 @@ bool performUndoOrRedo(BufferView * bv, Undo const & undo)
 
        // set cursor
        lyxerr <<   "undo, text: " << undo.text
-               << " inset: " << pit.inset()
-               << " index: " << undo.index
-               << std::endl;
+              << " inset: " << pit.inset()
+              << " index: " << undo.index
+              << " par: " << undo.cursor_par
+              << " pos: " << undo.cursor_pos
+              << std::endl;
 
        // set cursor again to force the position to be the right one
        text->cursor.par(undo.cursor_par);
@@ -200,12 +202,8 @@ bool performUndoOrRedo(BufferView * bv, Undo const & undo)
        // rebreak the entire lyxtext
        bv->text->fullRebreak();
 
-       InsetOld * inset = pit.inset();
-       if (inset) {
-               // magic needed to cope with inset locking
-               bv->lockInset(dynamic_cast<UpdatableInset *>(inset));
-       }
-
+       pit.lockPath(bv);
+       
        finishUndo();
        return true;
 }