From: Juergen Spitzmueller Date: Sun, 21 Apr 2019 07:55:17 +0000 (+0200) Subject: Fix renaming of citation refs after changing bibitem key X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2125 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=faefee3dc633e90d770f417c344c8047993ca360;p=features.git Fix renaming of citation refs after changing bibitem key Fixes: #6494 --- diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp index 221e6291b8..424755b533 100644 --- a/src/insets/InsetBibitem.cpp +++ b/src/insets/InsetBibitem.cpp @@ -155,8 +155,9 @@ void InsetBibitem::doDispatch(Cursor & cur, FuncRequest & cmd) setParam("literal", p["literal"]); if (p["key"] != old_key) { + cur.recordUndoFullBuffer(); + cur.bv().buffer().changeRefsIfUnique(old_key, p["key"]); updateCommand(p["key"]); - cur.bv().buffer().changeRefsIfUnique(old_key, params()["key"]); cur.forceBufferUpdate(); buffer().invalidateBibinfoCache(); }