Easy fix for mark dirty part of #7655. Also adds a simple check to

see if the label has changed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39211 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-06-29 13:42:55 +00:00
parent 450f719e58
commit 6e68683dbf

View File

@ -74,9 +74,12 @@ void InsetLabel::updateCommand(docstring const & new_label, bool updaterefs)
frontend::Alert::warning(_("Label names must be unique!"), frontend::Alert::warning(_("Label names must be unique!"),
bformat(_("The label %1$s already exists,\n" bformat(_("The label %1$s already exists,\n"
"it will be changed to %2$s."), new_label, label)); "it will be changed to %2$s."), new_label, label));
} } else if (label == old_label)
// Label was not changed.
return;
buffer().undo().beginUndoGroup(); buffer().undo().beginUndoGroup();
buffer().markDirty();
setParam("name", label); setParam("name", label);
if (updaterefs) { if (updaterefs) {