Author: rgheck
Date: Wed Jun 29 15:42:55 2011
New Revision: 39211
URL: http://www.lyx.org/trac/changeset/39211

Log:
Easy fix for mark dirty part of #7655. Also adds a simple check to
see if the label has changed.

Modified:
   lyx-devel/trunk/src/insets/InsetLabel.cpp

Modified: lyx-devel/trunk/src/insets/InsetLabel.cpp
==============================================================================
--- lyx-devel/trunk/src/insets/InsetLabel.cpp   Wed Jun 29 15:32:28 2011        
(r39210)
+++ lyx-devel/trunk/src/insets/InsetLabel.cpp   Wed Jun 29 15:42:55 2011        
(r39211)
@@ -74,9 +74,12 @@
                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) {

Reply via email to