From 6f455a916bab1897562d6d2031fbf6941ffb2fbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 3 Mar 2008 12:22:17 +0000 Subject: [PATCH] * src/insets/InsetLabel.cpp (doDispatch): - restore call to changeRefsIfUnique. The references were not updated if the label name was changed. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23410 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetLabel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 2f3f13d60e..251ca14b3c 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -104,7 +104,7 @@ docstring InsetLabel::screenLabel() const } -void InsetLabel::updateLabels(ParIterator const & it) +void InsetLabel::updateLabels(ParIterator const &) { docstring const & label = getParam("name"); if (buffer().insetLabel(label)) @@ -145,7 +145,11 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd) cur.noUpdate(); break; } + docstring old_name = params()["name"]; update(p["name"]); + if (params()["name"] != old_name) + cur.bv().buffer().changeRefsIfUnique(old_name, + params()["name"], REF_CODE); break; } -- 2.39.2