]> git.lyx.org Git - features.git/commitdiff
addendum to r39250: I forgot about math labels. This fixes it.
authorAbdelrazak Younes <younes@lyx.org>
Wed, 6 Jul 2011 18:52:56 +0000 (18:52 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Wed, 6 Jul 2011 18:52:56 +0000 (18:52 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39251 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetLabel.cpp
src/insets/InsetLabel.h

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();
index 35edecf567dd5ee593e36cc12ade1c8e11ac1218..61bcc1f3109d052835f4c2f5d2b66256bf4a7e84 100644 (file)
@@ -33,8 +33,8 @@ public:
        docstring const & prettyCounter() const { return pretty_counter_; }
        /// Updates only the label string, doesn't handle undo nor references.
        void updateLabel(docstring const & new_label);
-       /// Updates the label. Will handle undo/redo as well as update the
-       /// references to this label if \p cursor is passed.
+       /// Updates the label and the references to it.
+       /// Will also handle undo/redo if \p cursor is passed.
        void updateLabelAndRefs(docstring const & new_label, Cursor * cursor = 0);
 
        /// \name Public functions inherited from Inset class