]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/formulamacro.C
revert Buffer LyxText->InsetText commit
[lyx.git] / src / mathed / formulamacro.C
index ec4a5addc4e981d4243db07b26a20a13452b5a84..348454b6385179263219241f53c9b7c9908f3409 100644 (file)
@@ -128,8 +128,8 @@ string InsetFormulaMacro::prefix() const
 void InsetFormulaMacro::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        MathNestInset::metrics(mi);
-       dim = cell(0).dim(); 
-       dim += cell(1).dim(); 
+       dim = cell(0).dim();
+       dim += cell(1).dim();
        dim.asc += 5;
        dim.des += 5;
        dim.wid += 10 + font_metrics::width(prefix(), mi.base.font);
@@ -170,9 +170,12 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
        pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg);
        pi.pain.rectangle(x, a, w, h, LColor::mathframe);
 
+#warning FIXME
+#if 0
        LCursor & cur = p.base.bv->cursor();
        if (cur.isInside(this))
                cur.drawSelection(pi);
+#endif
 
        pi.pain.text(x + 2, y, prefix(), font);
 
@@ -180,7 +183,6 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
 #warning FIXME
 #if 0
        par()->draw(pi, x + font_metrics::width(prefix(), p.base.font) + 5, y);
-       xo_ = x;
-       yo_ = y;
 #endif
+       setPosCache(pi, x, y);
 }