]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_braceinset.C
Fix event loop to no longer eat CPU
[lyx.git] / src / mathed / math_braceinset.C
index a23154cb2b9fed7cb735ed196e775df710ebadd9..7e8a70234969bf181baddd470e7044a3dcdf87e5 100644 (file)
@@ -16,6 +16,7 @@
 #include "math_support.h"
 #include "LColor.h"
 #include "support/std_ostream.h"
+#include "frontends/Painter.h"
 
 using std::max;
 using std::auto_ptr;
@@ -33,7 +34,7 @@ MathBraceInset::MathBraceInset(MathArray const & ar)
 }
 
 
-auto_ptr<InsetBase> MathBraceInset::clone() const
+auto_ptr<InsetBase> MathBraceInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathBraceInset(*this));
 }
@@ -58,9 +59,9 @@ void MathBraceInset::draw(PainterInfo & pi, int x, int y) const
        font.setColor(LColor::latex);
        Dimension t;
        mathed_char_dim(font, '{', t);
-       drawChar(pi, font, x, y, '{');
+       pi.pain.text(x, y, '{', font);
        cell(0).draw(pi, x + t.wid, y);
-       drawChar(pi, font, x + t.wid + cell(0).width(), y, '}');
+       pi.pain.text(x + t.wid + cell(0).width(), y, '}', font);
        drawMarkers(pi, x, y);
 }