InsetBibitem.cpp: fix bibitemWidest.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29805 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-05-23 05:59:44 +00:00
parent e4f95b890c
commit caf8a509fa

View File

@ -199,6 +199,8 @@ docstring bibitemWidest(Buffer const & buffer)
font.
*/
docstring lbl;
ParagraphList::const_iterator it = buffer.paragraphs().begin();
ParagraphList::const_iterator end = buffer.paragraphs().end();
@ -224,12 +226,14 @@ docstring bibitemWidest(Buffer const & buffer)
// potentially the wrong one.
int const wx = label.size();
if (wx > w)
if (wx > w) {
w = wx;
lbl = label;
}
}
if (bitem && !bitem->bibLabel().empty())
return bitem->bibLabel();
if (!lbl.empty())
return lbl;
return from_ascii("99");
}