]> 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>
Mon, 22 Apr 2019 07:18:29 +0000 (09:18 +0200)
Fixes: #6494
(cherry picked from commit faefee3dc633e90d770f417c344c8047993ca360)

src/insets/InsetBibitem.cpp
status.23x

index f9b244c4603f556d3a5c68af74a1c182f4830b22..596ddf92076e6cc233731fa8ea3106662d980a0f 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();
                }
index ac02bf39e9107a40c0c70692d5935eb3ca611429..7df75f26d7938a4a2facb7cb0f974daec2d999d2 100644 (file)
@@ -34,6 +34,9 @@ What's new
 
 - Allow nameref in math references (bug 9798).
 
+- Fix renaming of citation references after changing bibliography key
+  (bug 6494).
+
 - Make tab movement visible (bug 10733).
 
 - Add "Reset" and "Reset All Fields" buttons to Text Properties
@@ -54,7 +57,7 @@ What's new
 - Improve performance on Windows with lots of math insets or very long
   math formulas (bug 11546).
 
-- Add Shortcut (Comand-0) for workaera zoom reset to mac.bind.
+- Add Shortcut (Command-0) for workarwa zoom reset to mac.bind.
 
 - Improve some icons (bug 11476).