]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathEnsureMath.cpp
add busy.gif to resources (in line with cmake)
[lyx.git] / src / mathed / InsetMathEnsureMath.cpp
index 8f738a8dae7b6e00c112c2436c63ec456312da81..3fdb3fbba9beeff3cacae91ca710a0b9d05c284a 100644 (file)
@@ -13,8 +13,9 @@
 
 #include "InsetMathEnsureMath.h"
 
-#include "MathStream.h"
 #include "MathData.h"
+#include "MathStream.h"
+#include "MathSupport.h"
 
 #include <ostream>
 
@@ -34,7 +35,8 @@ Inset * InsetMathEnsureMath::clone() const
 
 void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       FontSetChanger dummy(mi.base, "mathnormal");
+       bool really_change_font = isTextFont(from_ascii(mi.base.fontname));
+       FontSetChanger dummy(mi.base, "mathnormal", really_change_font);
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
 }
@@ -42,7 +44,8 @@ void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
 {
-       FontSetChanger dummy(pi.base, "mathnormal");
+       bool really_change_font = isTextFont(from_ascii(pi.base.fontname));
+       FontSetChanger dummy(pi.base, "mathnormal", really_change_font);
        cell(0).draw(pi, x, y);
        drawMarkers(pi, x, y);
 }