]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_envinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_envinset.C
index c5f768bf5fa900e50c4998bf9b76f2579346868b..14942be2b16635486096c4a8afbb1590d5a4cf5f 100644 (file)
 #include <config.h>
 
 #include "math_envinset.h"
+#include "math_data.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
 #include "support/std_ostream.h"
 
+
+using std::string;
 using std::auto_ptr;
 
 
@@ -23,7 +26,7 @@ MathEnvInset::MathEnvInset(string const & name)
 {}
 
 
-auto_ptr<InsetBase> MathEnvInset::clone() const
+auto_ptr<InsetBase> MathEnvInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathEnvInset(*this));
 }
@@ -31,9 +34,9 @@ auto_ptr<InsetBase> MathEnvInset::clone() const
 
 void MathEnvInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       cell(0).metrics(mi, dim_);
-       metricsMarkers();
-       dim = dim_;
+       cell(0).metrics(mi, dim);
+       metricsMarkers(dim);
+       dim_ = dim;
 }