#include "BufferView.h"
#include "lyxtext.h"
#include "paragraph.h"
+#include "ParagraphList.h"
-#include "mathed/math_support.h"
+#include "mathed/MathSupport.h"
#include "insets/inset.h"
#include <algorithm>
-using lyx::pit_type;
+
+namespace lyx {
using std::advance;
using std::endl;
// We stored the full cell here as there is not much to be
// gained by storing just 'a few' paragraphs (most if not
// all math inset cells have just one paragraph!)
+ //lyxerr << "undo.array=" << undo.array <<endl;
asArray(undo.array, dit.cell());
} else {
// Some finer machinery is needed here.
// this ugly stuff is needed until we get rid of the
// inset_owner backpointer
- ParagraphList::const_iterator pit = undo.pars.begin();
- ParagraphList::const_iterator end = undo.pars.end();
+ ParagraphList::iterator pit = undo.pars.begin();
+ ParagraphList::iterator const end = undo.pars.end();
for (; pit != end; ++pit)
- const_cast<Paragraph &>(*pit).setInsetOwner(&dit.inset());
+ pit->setInsetOwner(dit.realInset());
plist.insert(first, undo.pars.begin(), undo.pars.end());
}
{
LCursor c = cur;
c.pop();
- recordUndo(c, kind);
+ Buffer * buf = cur.bv().buffer();
+ doRecordUndo(kind, c, c.pit(), c.pit(), cur,
+ buf->params(), false, buf->undostack());
}
);
undo_finished = false;
}
+
+
+} // namespace lyx