]> git.lyx.org Git - features.git/commitdiff
Easy fix for mark dirty part of #7655. Also adds a simple check to
authorRichard Heck <rgheck@comcast.net>
Wed, 29 Jun 2011 13:42:55 +0000 (13:42 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 29 Jun 2011 13:42:55 +0000 (13:42 +0000)
see if the label has changed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39211 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetLabel.cpp

index 6f2e9f59ce295f7f0c22050dcc22e4842e419647..76083ad91cc65b9d784ca573f8566eae8e08023c 100644 (file)
@@ -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) {