From: Dekel Tsur Date: Thu, 25 Jan 2001 15:32:35 +0000 (+0000) Subject: Fix crashes with the bibliography layout. X-Git-Tag: 1.6.10~21695 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=695a6edfc1ba0ba8a957dd1442479d2b9a21b855;p=features.git Fix crashes with the bibliography layout. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1392 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 023f59402a..eeca506f9c 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2001-01-25 Dekel Tsur + + * 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 * insetcommand.C (getAsString, setFromString): Cleanup. diff --git a/src/insets/insetbib.C b/src/insets/insetbib.C index d0f9e2dddc..3c7f03a762 100644 --- a/src/insets/insetbib.C +++ b/src/insets/insetbib.C @@ -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;