Do not update refs on new label creation (#8147)

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.
(cherry picked from commit 86cccf1077)
This commit is contained in:
Juergen Spitzmueller 2012-09-19 10:14:56 +02:00
parent 63caef5505
commit b11704d2fb
2 changed files with 8 additions and 3 deletions

View File

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

View File

@ -133,6 +133,9 @@ What's new
- Fix crash when using undo in a paragraph with layout Bibliography (bug 7111). - Fix crash when using undo in a paragraph with layout Bibliography (bug 7111).
- Fix bug where references were erroneously changed when a duplicate label
name was resolved (bug 8147).
- Make sure that undo restores environment depth correctly (bug 8159). - Make sure that undo restores environment depth correctly (bug 8159).
- Make sure that undo restores paragraph longest label width correctly - Make sure that undo restores paragraph longest label width correctly