]> git.lyx.org Git - features.git/commitdiff
Fix renaming of citation refs after changing bibitem key
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 21 Apr 2019 07:55:17 +0000 (09:55 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 21 Apr 2019 07:55:17 +0000 (09:55 +0200)
Fixes: #6494
src/insets/InsetBibitem.cpp

index 221e6291b8b71cd932944162d09ed2a545c696d6..424755b533d089515c8a227d1d564202c16a73ba 100644 (file)
@@ -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();
                }