]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSubstack.cpp
Fix drawing of empty boxes
[lyx.git] / src / mathed / InsetMathSubstack.cpp
index f88f4927e37c177856a489d0d174bb9b1d6a5df3..fb29077067d087d5467bb53c69651abd43379361 100644 (file)
 
 #include "InsetMathSubstack.h"
 
-#include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
 
 #include "FuncRequest.h"
 #include "FuncStatus.h"
-#include "support/gettext.h"
+#include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
 
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
 #include <ostream>
@@ -44,17 +45,16 @@ Inset * InsetMathSubstack::clone() const
 
 void InsetMathSubstack::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       if (mi.base.style == LM_ST_DISPLAY) {
-               StyleChanger dummy(mi.base, LM_ST_TEXT);
-               InsetMathGrid::metrics(mi, dim);
-       } else {
-               InsetMathGrid::metrics(mi, dim);
-       }
+       Changer dummy2 = mi.base.changeEnsureMath();
+       Changer dummy = mi.base.changeArray();
+       InsetMathGrid::metrics(mi, dim);
 }
 
 
 void InsetMathSubstack::draw(PainterInfo & pi, int x, int y) const
 {
+       Changer dummy2 = pi.base.changeEnsureMath();
+       Changer dummy = pi.base.changeArray();
        InsetMathGrid::draw(pi, x + 1, y);
 }