]> git.lyx.org Git - lyx.git/commitdiff
Do not update refs on new label creation (#8147)
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 19 Sep 2012 08:14:56 +0000 (10:14 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 19 Sep 2012 08:14:56 +0000 (10:14 +0200)
This assures that refs to existing labels are not being touched if a new label with a duplicate name is created, and the name then changed by the duplicate checker.

Branch candidate.

src/insets/InsetLabel.cpp

index 443c78e1cbb3b8ee853a61c41c20df86c6c1caa4..e52540e89d4eda62fba0400ce35b48a6db48aa90 100644 (file)
@@ -55,9 +55,11 @@ InsetLabel::InsetLabel(Buffer * buf, InsetCommandParams const & p)
 
 void InsetLabel::initView()
 {
-       // FIXME: This seems to be used only for inset creation so
-       // we probably just need to call updateLabel() here.
-       updateLabelAndRefs(getParam("name"));
+       // This seems to be used only for inset creation.
+       // Therefore we do not update refs here, since this would
+       // erroneously change refs from existing duplicate labels
+       // (#8141).
+       updateLabel(getParam("name"));
 }