]> git.lyx.org Git - lyx.git/blobdiff - src/undo_funcs.C
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / undo_funcs.C
index 0288a053c56e54f9d31c7b3405df31b9e92e7d7c..56b53ec745517dd9df85878b2189693875fed901 100644 (file)
@@ -19,6 +19,7 @@
 #include "buffer.h"
 #include "insets/inset.h"
 #include "debug.h"
+#include "support/LAssert.h"
 
 /// the flag used by FinishUndo();
 bool undo_finished;
@@ -159,7 +160,7 @@ bool textHandleUndo(BufferView * bv, Undo * undo)
                        endpar = behind;
     
                tmppar = bv->buffer()->getParFromID(undo->number_of_cursor_par);
-               UpdatableInset* it = static_cast<UpdatableInset*>(tmppar3->InInset());
+               UpdatableInset* it = static_cast<UpdatableInset*>(tmppar3->inInset());
                if (it) {
                        it->getLyXText(bv)->redoParagraphs(bv, it->getLyXText(bv)->cursor,
                                                           endpar);
@@ -239,8 +240,8 @@ Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
                before_number = first->previous()->id();
        if (behind)
                behind_number = behind->id();
-       if (first->InInset())
-               inset_id = first->InInset()->id();
+       if (first->inInset())
+               inset_id = first->inInset()->id();
 
        // Undo::EDIT  and Undo::FINISH are
        // always finished. (no overlapping there)
@@ -295,7 +296,7 @@ Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
   
                while (tmppar != end && tmppar->next()) {
                        tmppar = tmppar->next();
-                       tmppar2->next(new Paragraph(*tmppar));
+                       tmppar2->next(new Paragraph(*tmppar, false));
                        tmppar2->next()->id(tmppar->id());
                        // a memory optimization: Just store the layout
                        // information when only edit