]> git.lyx.org Git - lyx.git/blobdiff - src/Undo.cpp
Use footnotehyper rather than footnote if hyperref is used
[lyx.git] / src / Undo.cpp
index eb7722839c2d9ca27b7134b15b73652ca7954a47..693008268a159b2753359ddfcee1a02954dfaa36 100644 (file)
@@ -472,6 +472,7 @@ void Undo::Private::doTextUndoOrRedo(CursorData & cur, UndoElementStack & stack,
                //LYXERR0("undo.array: " << *undo.array);
                LBUFERR(undo.array);
                dit.cell().swap(*undo.array);
+               dit.inset().setBuffer(buffer_);
                delete undo.array;
                undo.array = 0;
        } else {
@@ -609,6 +610,14 @@ void Undo::endUndoGroup(CursorData const & cur_after)
 }
 
 
+bool Undo::activeUndoGroup() const
+{
+       return d->group_level_ > 0
+               && !d->undostack_.empty()
+               && d->undostack_.top().group_id == d->group_id_;
+}
+
+
 void Undo::recordUndo(CursorData const & cur, UndoKind kind)
 {
        d->recordUndo(kind, cur, cur.pit(), cur.pit(), cur);