]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibitem.cpp
Cocoa based Qt-4.6 needs to paint every character separately to match metrics computa...
[lyx.git] / src / insets / InsetBibitem.cpp
index a685ca0cac1ee36f5ecf34c627cf776bf2ea4325..d3a10ae63c645bb653a161109434dc75047e42ac 100644 (file)
@@ -122,6 +122,9 @@ void InsetBibitem::doDispatch(Cursor & cur, FuncRequest & cmd)
                        cur.noScreenUpdate();
                        break;
                }
+
+               cur.recordUndo();
+
                docstring const & old_key = params()["key"];
                docstring const & old_label = params()["label"];
                docstring label = p["label"];
@@ -308,7 +311,7 @@ docstring bibitemWidest(Buffer const & buffer, OutputParams const & runparams)
 }
 
 
-void InsetBibitem::fillWithBibKeys(BiblioInfo & keys, InsetIterator const & it) const
+void InsetBibitem::collectBibKeys(InsetIterator const & it) const
 {
        docstring const key = getParam("key");
        BibTeXInfo keyvalmap(false);
@@ -316,7 +319,7 @@ void InsetBibitem::fillWithBibKeys(BiblioInfo & keys, InsetIterator const & it)
        DocIterator doc_it(it); 
        doc_it.forwardPos();
        keyvalmap[from_ascii("ref")] = doc_it.paragraph().asString();
-       keys[key] = keyvalmap;
+       buffer().addBibTeXInfo(key, keyvalmap);
 }