X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetLabel.cpp;h=789a774ac6b993ecc2114cf9091c3ad56ecdb913;hb=9da29ac7884158580a01f068952adef73ae11883;hp=e8e79338e2c526fd423ef0067a959115a6c61512;hpb=75bfed55079cab6b73fbea6ce4ae3f10d1af3b91;p=lyx.git diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index e8e79338e2..789a774ac6 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -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); }