]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
Add suffixed lyxconvert to cmake build.
[lyx.git] / src / insets / InsetLabel.cpp
index e8e79338e2c526fd423ef0067a959115a6c61512..789a774ac6b993ecc2114cf9091c3ad56ecdb913 100644 (file)
@@ -109,11 +109,13 @@ void InsetLabel::updateLabelAndRefs(docstring const & new_label,
 void InsetLabel::updateReferences(docstring const & old_label,
                docstring const & new_label)
 {
+       UndoGroupHelper ugh;
        Buffer::References const & refs = buffer().references(old_label);
        Buffer::References::const_iterator it = refs.begin();
        Buffer::References::const_iterator end = refs.end();
        for (; it != end; ++it) {
-               buffer().undo().recordUndo(CursorData(it->second));
+               ugh.resetBuffer(it->second.buffer());
+               it->second.buffer()->undo().recordUndo(CursorData(it->second));
                if (it->first->lyxCode() == MATH_REF_CODE) {
                        InsetMathRef * mi = it->first->asInsetMath()->asRefInset();
                        mi->changeTarget(new_label);
@@ -212,6 +214,8 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
                        enabled = false;
                        break;
                }
+               // no "changetype":
+               // fall through
        default:
                return InsetCommand::getStatus(cur, cmd, status);
        }