]> git.lyx.org Git - features.git/commit
Remove InsetMathSqrt hack from MathMacro
authorGeorg Baum <baum@lyx.org>
Sun, 29 Mar 2015 12:50:37 +0000 (14:50 +0200)
committerGeorg Baum <baum@lyx.org>
Sun, 29 Mar 2015 12:50:37 +0000 (14:50 +0200)
commit417139f4da6532c278d3744f191b33804ee26ea0
tree2a3f7d5cacc74956d6b868208a3c1ffbb0bbe8b8
parentd48855cdfe1171efd908f2223c6c097ec91344c9
Remove InsetMathSqrt hack from MathMacro

The expanded cells of a mathmacro were previously stored in an InsetMathSqrt.
This was only used as a container for the MathData object in the first cell
of the sqrt inset, which contained the actual expanded arguments.
Funny enough, the only place were the inset property of expanded_ was really
used cannot be seen in the diff. It was MathMacro::kerning(), and this usage
was wrong, since InsetMathSqrt::kerning() always returns 0. Threfore, using
the correct type (MathData) for expanded_ does not only make the code more
readable, gets rid of an unneeded dependency, but also fixes a bug: Now the
correct kerning is returned for expanded cells. Also, expanded_ and
definition_ use the same type now, which looks nicely symmetric.
src/mathed/MathMacro.cpp
src/mathed/MathMacro.h