From: Richard Heck Date: Wed, 29 Jun 2011 13:42:55 +0000 (+0000) Subject: Easy fix for mark dirty part of #7655. Also adds a simple check to X-Git-Tag: 2.1.0beta1~2990 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6e68683dbfe7ea116612eb7c63fa238cfd07fbea;p=features.git 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 --- diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 6f2e9f59ce..76083ad91c 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -74,9 +74,12 @@ void InsetLabel::updateCommand(docstring const & new_label, bool updaterefs) frontend::Alert::warning(_("Label names must be unique!"), bformat(_("The label %1$s already exists,\n" "it will be changed to %2$s."), new_label, label)); - } + } else if (label == old_label) + // Label was not changed. + return; buffer().undo().beginUndoGroup(); + buffer().markDirty(); setParam("name", label); if (updaterefs) {