]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
Fix bug #7975 following suggestions made by JMarc there.
[lyx.git] / src / insets / InsetLabel.cpp
index 2a380a74fae8c589db183783bfcedf66c3682d8a..7bff3d7c6e82ba722223127cf44e9a1083709cfc 100644 (file)
@@ -95,12 +95,9 @@ void InsetLabel::updateLabelAndRefs(docstring const & new_label,
        if (label == old_label)
                return;
 
-       if (!cursor)
-               return;
-
-       cursor->recordUndo();
        buffer().undo().beginUndoGroup();
-       buffer().markDirty();
+       if (cursor)
+               cursor->recordUndo();
        setParam("name", label);
        updateReferences(old_label, label);
        buffer().undo().endUndoGroup();