]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathEnv.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathEnv.cpp
index 5965d2969e77e9bdcc78fd505fefd8c146272e2c..3daba8179de46d9030624ae1fe26fcba5a299d1d 100644 (file)
 #include <config.h>
 
 #include "InsetMathEnv.h"
+
 #include "MathData.h"
 #include "MathStream.h"
 #include "MathStream.h"
-#include "support/std_ostream.h"
+
+#include <ostream>
 
 
 namespace lyx {
@@ -34,8 +36,6 @@ void InsetMathEnv::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -48,6 +48,7 @@ void InsetMathEnv::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathEnv::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
 }