From 2a01208cae1ef6bfeca9e93a11ab71a15c913549 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 6 Jul 2011 18:52:56 +0000 Subject: [PATCH] addendum to r39250: I forgot about math labels. This fixes it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39251 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetLabel.cpp | 7 ++----- src/insets/InsetLabel.h | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 2a380a74fa..7bff3d7c6e 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -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(); diff --git a/src/insets/InsetLabel.h b/src/insets/InsetLabel.h index 35edecf567..61bcc1f310 100644 --- a/src/insets/InsetLabel.h +++ b/src/insets/InsetLabel.h @@ -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 -- 2.39.2