]> git.lyx.org Git - lyx.git/commitdiff
Update a bibitem label also when it is emptied.
authorJulien Rioux <jrioux@lyx.org>
Sat, 3 Dec 2011 22:24:30 +0000 (22:24 +0000)
committerJulien Rioux <jrioux@lyx.org>
Sat, 3 Dec 2011 22:24:30 +0000 (22:24 +0000)
It is valid for a label to be empty, but up to now the bibliography
information was not updated when a label was emptied.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40347 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetBibitem.cpp

index 1dedfafe8598bd549534830e9a2f564d98352ab6..39076b9d997fdc8b0c8bba7043508894043a9f82 100644 (file)
@@ -166,12 +166,12 @@ void InsetBibitem::doDispatch(Cursor & cur, FuncRequest & cmd)
                                                if (label[previous] != '{')
                                                        label.replace(pos, 1, lbrace + brackets_escape[k] + rbrace);
                                }
+               }
 
-                       if (old_label != label) {
-                               p["label"] = label;
-                               cur.forceBufferUpdate();
-                               buffer().invalidateBibinfoCache();
-                       }
+               if (old_label != label) {
+                       p["label"] = label;
+                       cur.forceBufferUpdate();
+                       buffer().invalidateBibinfoCache();
                }
 
                setParam("label", p["label"]);