]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.C
Fix comment according to Enricos explanation
[lyx.git] / src / mathed / InsetMathNest.C
index c1dee95a2d44e56716d52f77c90a59bfd3e1a155..0c7446513599f79cda03b6b672fb538a488d3618 100644 (file)
@@ -52,7 +52,6 @@
 
 #include "frontends/Painter.h"
 #include "frontends/Selection.h"
-#include "frontends/nullpainter.h"
 
 #include "funcrequest.h"
 #include "lyxserver.h"
@@ -241,10 +240,9 @@ void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
                return;
 
        // FIXME: hack to get position cache warm
-       static frontend::NullPainter nop;
-       PainterInfo pinop(pi);
-       pinop.pain = nop;
-       draw(pinop, x, y);
+       pi.pain.setDrawingEnabled(false);
+       draw(pi, x, y);
+       pi.pain.setDrawingEnabled(true);
 
        CursorSlice s1 = cur.selBegin();
        CursorSlice s2 = cur.selEnd();