]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
Fix assertion when checking if change in selection
[lyx.git] / src / insets / InsetLabel.cpp
index 65e39910f3e495e7a3e5ba00d1a0e82bf0ade685..4dd0713730e921e74f444c2462bc6b90326000ec 100644 (file)
@@ -97,12 +97,12 @@ void InsetLabel::updateLabelAndRefs(docstring const & new_label,
        if (label == old_label)
                return;
 
-       buffer().undo().beginUndoGroup();
+       // This handles undo groups automagically
+       UndoGroupHelper ugh(&buffer());
        if (cursor)
                cursor->recordUndo();
        setParam("name", label);
        updateReferences(old_label, label);
-       buffer().undo().endUndoGroup();
 }