Fix crashes with the bibliography layout.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1392 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2001-01-25 15:32:35 +00:00
parent 48d9b0eccb
commit 695a6edfc1
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2001-01-25 Dekel Tsur <dekelts@tau.ac.il>
* insetbib.C (bibitemWidest): Use lyxfont::width instead of
par->bibkey->width. This fixes the crashes when running without
gui or when having included documents.
2001-01-22 Dekel Tsur <dekelts@tau.ac.il>
* insetcommand.C (getAsString, setFromString): Cleanup.

View File

@ -19,6 +19,7 @@
#include "support/filetools.h"
#include "support/path.h"
#include "lyxrc.h"
#include "font.h"
using std::ostream;
using std::ifstream;
@ -397,7 +398,9 @@ string const bibitemWidest(Buffer const * buffer)
while (par) {
if (par->bibkey) {
int const wx = par->bibkey->width(bv, font);
int const wx =
lyxfont::width(par->bibkey->getScreenLabel(),
font);
if (wx > w) {
w = wx;
bkey = par->bibkey;