From 6e68683dbfe7ea116612eb7c63fa238cfd07fbea Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 29 Jun 2011 13:42:55 +0000 Subject: [PATCH] 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 --- src/insets/InsetLabel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.39.2