+
+/// Update the counters of this inset and of its contents
+void InsetBibitem::updateLabels(Buffer const &buf, ParIterator const & pit)
+{
+ lyxerr << "update! " << to_utf8(getParam("key")) << std::endl;
+ Counters & counters = buf.params().getTextClass().counters();
+ docstring const bibitem = from_ascii("bibitem");
+ if (counters.hasCounter(bibitem) && getParam("label").empty()) {
+ counters.step(bibitem);
+ autolabel_ = counters.theCounter(bibitem);
+ } else
+ autolabel_ = from_ascii("??");
+ refresh();
+}
+
+