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
This commit is contained in:
Abdelrazak Younes 2011-07-06 18:52:56 +00:00
parent f9e9956169
commit 2a01208cae
2 changed files with 4 additions and 7 deletions

View File

@ -95,12 +95,9 @@ void InsetLabel::updateLabelAndRefs(docstring const & new_label,
if (label == old_label) if (label == old_label)
return; return;
if (!cursor)
return;
cursor->recordUndo();
buffer().undo().beginUndoGroup(); buffer().undo().beginUndoGroup();
buffer().markDirty(); if (cursor)
cursor->recordUndo();
setParam("name", label); setParam("name", label);
updateReferences(old_label, label); updateReferences(old_label, label);
buffer().undo().endUndoGroup(); buffer().undo().endUndoGroup();

View File

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