]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_sqrtinset.C
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / src / mathed / math_sqrtinset.C
index 9a3d3c6f72c476292f09c5ad12c156c522087940..4705ae78461cf74f8c202dc4f061c2f2a74d57ce 100644 (file)
@@ -1,8 +1,21 @@
+/**
+ * \file math_sqrtinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
 #include "math_sqrtinset.h"
+#include "math_data.h"
 #include "math_mathmlstream.h"
+#include "textpainter.h"
 #include "LColor.h"
 #include "frontends/Painter.h"
-#include "textpainter.h"
 
 using std::auto_ptr;
 
@@ -12,7 +25,7 @@ MathSqrtInset::MathSqrtInset()
 {}
 
 
-auto_ptr<InsetBase> MathSqrtInset::clone() const
+auto_ptr<InsetBase> MathSqrtInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathSqrtInset(*this));
 }
@@ -20,12 +33,12 @@ auto_ptr<InsetBase> MathSqrtInset::clone() const
 
 void MathSqrtInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       cell(0).metrics(mi, dim_);
-       dim_.asc += 4;
-       dim_.des += 2;
-       dim_.wid += 12;
-       metricsMarkers(1);
-       dim = dim_;
+       cell(0).metrics(mi, dim);
+       dim.asc += 4;
+       dim.des += 2;
+       dim.wid += 12;
+       metricsMarkers(dim);
+       dim_ = dim;
 }