]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_colorinset.C
Ensure all #warning statements are wrapped by #ifdef WITH_WARNINGS.
[lyx.git] / src / mathed / math_colorinset.C
index 16a9acc1a8901d91cd4d32ca40b17796f9c05345..5a87a63f8501f03ca1abb569607505252c49957c 100644 (file)
@@ -45,7 +45,7 @@ void MathColorInset::metrics(MetricsInfo & mi, Dimension & dim) const
                dim.asc += 4;
                dim.des += 4;
                dim.wid += 2 * w_ + 4;
-               metricsMarkers();
+               metricsMarkers(dim);
        }
        dim_ = dim;
 }
@@ -68,6 +68,7 @@ void MathColorInset::draw(PainterInfo & pi, int x, int y) const
        pi.base.font.setColor(lcolor.getFromGUIName(asString(cell(0))));
        cell(1).draw(pi, x, y);
        pi.base.font.setColor(origcol);
+       setPosCache(pi, x, y);
 }
 
 
@@ -82,7 +83,7 @@ void MathColorInset::write(WriteStream & os) const
 {
        if (oldstyle_)
                os << "{\\color" << '{' << cell(0) << '}' << cell(1) << '}';
-       else 
+       else
                os << "\\textcolor" << '{' << cell(0) << "}{" << cell(1) << '}';
 }