]> git.lyx.org Git - lyx.git/blobdiff - src/undo_funcs.C
don't copy if a reference is fine
[lyx.git] / src / undo_funcs.C
index 68b6576053d2efb2883bd13281847785af87f2ea..e0b0e42117d517414b6e2151597628b46efd689d 100644 (file)
@@ -388,13 +388,19 @@ Undo * createUndo(BufferView * bv, Undo::undo_kind kind,
   
                while (tmppar != end && tmppar->next()) {
                        tmppar = tmppar->next();
+#if 0
                        tmppar2->next(new Paragraph(*tmppar, true));
+#else
+                       Paragraph * ptmp = new Paragraph(*tmppar, true);
+                       tmppar2->next(ptmp);
+#endif
                        // a memory optimization: Just store the layout
                        // information when only edit
                        if (kind == Undo::EDIT) {
                                tmppar2->clearContents();
                        }
                        tmppar2->next()->previous(tmppar2);
+                       
                        tmppar2 = tmppar2->next();
                }
                tmppar2->next(0);