]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_stringinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_stringinset.C
index 1df9f46d1f4ef007dc415d035eb557ff6a4c5b17..8b157df513b33cd6a4da1684f25a740ca00deb97 100644 (file)
@@ -15,6 +15,8 @@
 #include "math_streamstr.h"
 #include "math_support.h"
 
+
+using std::string;
 using std::auto_ptr;
 
 
@@ -23,7 +25,7 @@ MathStringInset::MathStringInset(string const & s)
 {}
 
 
-auto_ptr<InsetBase> MathStringInset::clone() const
+auto_ptr<InsetBase> MathStringInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathStringInset(*this));
 }
@@ -38,7 +40,7 @@ void MathStringInset::metrics(MetricsInfo & mi, Dimension & dim) const
 void MathStringInset::draw(PainterInfo & pi, int x, int y) const
 {
        //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
-       drawStr(pi, pi.base.font, x, y, str_);
+       pi.draw(x, y, str_);
 }