Fix ascent, descent info.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4585 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-07-10 10:32:31 +00:00
parent 0e3d3dc850
commit a51e6d7cab
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2002-07-09 Angus Leeming <leeming@lyx.org>
* PreviewLoader.C (setAscentFractions): fix bug due to use of integer
arithmetic when it should be floating.
2002-07-09 Angus Leeming <leeming@lyx.org>
* PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".

View File

@ -664,8 +664,8 @@ void setAscentFractions(vector<double> & ascent_fractions,
string page;
string page_id;
int dummy;
int ascent;
int descent;
double ascent;
double descent;
ifs >> page >> page_id >> dummy >> dummy >> dummy >> dummy
>> ascent >> descent >> dummy;
@ -679,8 +679,9 @@ void setAscentFractions(vector<double> & ascent_fractions,
<< endl;
break;
}
*it = ascent / (ascent + descent);
if (ascent + descent != 0)
*it = ascent / (ascent + descent);
}
}