]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_deliminset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_deliminset.C
index a700569c79b56990397856a0a6970d1d7f897471..1e179f8bed40c726f8f774682688f531f15dce09 100644 (file)
 #include <config.h>
 
 #include "math_deliminset.h"
-#include "math_support.h"
+#include "math_data.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
+#include "math_support.h"
 
 
+using std::string;
 using std::max;
 using std::auto_ptr;
 
@@ -62,7 +64,7 @@ MathDelimInset::MathDelimInset
 }
 
 
-auto_ptr<InsetBase> MathDelimInset::clone() const
+auto_ptr<InsetBase> MathDelimInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathDelimInset(*this));
 }
@@ -109,10 +111,11 @@ void MathDelimInset::draw(PainterInfo & pi, int x, int y) const
        mathed_draw_deco(pi, x + 4, b, dw_, dim_.height(), left_);
        mathed_draw_deco(pi, x + dim_.width() - dw_ - 4,
                b, dw_, dim_.height(), right_);
+       setPosCache(pi, x, y);
 }
 
 
-bool MathDelimInset::isParanthesis() const
+bool MathDelimInset::isParenthesis() const
 {
        return left_ == "(" && right_ == ")";
 }