]> git.lyx.org Git - features.git/commitdiff
Fix crashes with the bibliography layout.
authorDekel Tsur <dekelts@tau.ac.il>
Thu, 25 Jan 2001 15:32:35 +0000 (15:32 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Thu, 25 Jan 2001 15:32:35 +0000 (15:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1392 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetbib.C

index 023f59402af44b09a570b5615b8cd6f027ad3ddb..eeca506f9c074e531d9c0b997d73b0307ebd54c2 100644 (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.
index d0f9e2dddce6e3cc9c57c8a7b2bbf1feb3579f1f..3c7f03a762ede717ab4c3de7944408746cee97c4 100644 (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;