mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
* Change the dim parameter correctly, even if dim_ has not changed
(fixes http://bugzilla.lyx.org/show_bug.cgi?id=3858) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18765 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dad101c2e3
commit
832136c37c
@ -25,24 +25,18 @@ using std::auto_ptr;
|
||||
|
||||
InsetMathKern::InsetMathKern()
|
||||
{
|
||||
dim_.asc = 0;
|
||||
dim_.des = 0;
|
||||
}
|
||||
|
||||
|
||||
InsetMathKern::InsetMathKern(Length const & w)
|
||||
: wid_(w)
|
||||
{
|
||||
dim_.asc = 0;
|
||||
dim_.des = 0;
|
||||
}
|
||||
|
||||
|
||||
InsetMathKern::InsetMathKern(docstring const & s)
|
||||
: wid_(to_utf8(s))
|
||||
{
|
||||
dim_.asc = 0;
|
||||
dim_.des = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -54,11 +48,12 @@ auto_ptr<Inset> InsetMathKern::doClone() const
|
||||
|
||||
bool InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
int wid_pixel = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
|
||||
if (wid_pixel == dim_.wid)
|
||||
dim.asc = 0;
|
||||
dim.des = 0;
|
||||
dim.wid = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
|
||||
if (dim == dim_)
|
||||
return false;
|
||||
dim_.wid = wid_pixel;
|
||||
dim = dim_;
|
||||
dim_ = dim;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user