]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathChar.C
This commit fixes a crash when accessing a math inset. This was due to an invalid...
[lyx.git] / src / mathed / InsetMathChar.C
index 2d3c12026d68d87cf95bb9df1746d9474c4c5d54..9307a721eef5ca4e48e7d27a0f4f0c53afe42647 100644 (file)
@@ -20,8 +20,6 @@
 #include "support/lstrings.h"
 #include "TextPainter.h"
 
-#include "frontends/Application.h"
-#include "frontends/FontLoader.h"
 #include "frontends/FontMetrics.h"
 
 using std::auto_ptr;
@@ -80,7 +78,7 @@ void InsetMathChar::metrics(MetricsInfo & mi, Dimension & dim) const
        whichFont(font_, code_, mi);
        mathed_char_dim(font_, char_, dim_);
        if (isBinaryOp(char_, code_))
-               width_ += 2 * theApp->fontLoader().metrics(font_).width(' ');
+               width_ += 2 * theFontMetrics(font_).width(' ');
        lyxerr << "InsetMathChar::metrics: " << dim << endl;
 #endif
        width_ = dim.wid;