]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDecoration.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / mathed / InsetMathDecoration.cpp
index ae95cdc1d5473e6acf5943c84db736f6f41a6335..a5d616eed300512518b9557319e6fc23913b3403 100644 (file)
@@ -122,8 +122,8 @@ void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
        cell(0).metrics(mi, dim);
 
        int const l1 = mi.base.bv->zoomedPixels(1);
-       int const l2 = 4 * l1;
-       int const l3 = 4 * l1;
+       int const l2 = mathed_char_width(mi.base.font, 'x') - l1;
+       int const l3 = l2;
 
        dh_  = l2; //mathed_char_height(LM_TC_VAR, mi, 'I', ascent_, descent_);
        dw_  = l3; //mathed_char_width(LM_TC_VAR, mi, 'x');
@@ -246,7 +246,7 @@ void InsetMathDecoration::mathmlize(MathMLStream & ms) const
        char const * const outag = cur->second.over ? "mover" : "munder";
        std::string decoration = ms.xmlMode() ? cur->second.entity : cur->second.tag;
        ms << MTag(outag)
-          << MTag("mrow") << cell(0) << ETag("mrow")
+          << cell(0)
           << "<" << from_ascii(ms.namespacedTag("mo")) << " stretchy=\"true\">"
           << from_ascii(decoration)
           << "</" << from_ascii(ms.namespacedTag("mo")) << ">"