On Tue, Sep 11, 2007 at 07:41:29PM +0300, Martin Vermeer wrote: > On Tue, Sep 11, 2007 at 05:37:32PM +0200, Andre Poenitz wrote: > > On Tue, Sep 11, 2007 at 10:50:56AM +0300, Martin Vermeer wrote: > > > Here's a better one. > > > > Not really ;-) > > > > > Index: src/mathed/InsetMathFrac.cpp > > > =================================================================== > > > --- src/mathed/InsetMathFrac.cpp (revision 20193) > > > +++ src/mathed/InsetMathFrac.cpp (working copy) > > > @@ -48,9 +48,11 @@ > > > bool InsetMathFrac::metrics(MetricsInfo & mi, Dimension & dim) const > > > { > > > FracChanger dummy(mi.base); > > > + if (kind_ == UNITFRAC) > > > + ShapeChanger dummy2(mi.base.font, Font::UP_SHAPE); > > > cell(0).metrics(mi); > > > cell(1).metrics(mi); > > > > The ShapeChanger changes the Shape back to the original state when it is > > destructed, i.e. the end of its scope. In this particular piece of code > > the scope of 'dummy2' is the 'if' branch, i.e. the shape will already be > > restored before cell(0).metrics() is called. > > > > I am not sure that changing the shape is needed at all. Is the resulting > > metrics visually different? > > Perhaps not, but would it be wise to count on that?
*shrug* If it walks likes a duck... Andre'