]> git.lyx.org Git - features.git/commitdiff
Fix stmaryrd operators with limits (bug 9458)
authorGeorg Baum <baum@lyx.org>
Fri, 13 Mar 2015 17:34:39 +0000 (18:34 +0100)
committerGeorg Baum <baum@lyx.org>
Fri, 13 Mar 2015 17:38:38 +0000 (18:38 +0100)
LyX did not display the limits of the big math operators defined by
stmaryrd.sty correctly. The reason for this was a missing check in
InsetMathSymbol::metrics(), where it is hardcoded which symbols use display
style limits and which symbols use inline limits. In an ideal world this
information would be contained explicitly in lib/symbols.

This should go to branch as well.

src/mathed/InsetMathSymbol.cpp

index 0bd61d9b5f70fef9da99193e38b5afa27011d976..8b2d1a2f723051bec9f4345f7d48f7db6349e712 100644 (file)
@@ -87,7 +87,8 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
        scriptable_ = false;
        if (mi.base.style == LM_ST_DISPLAY)
                if (sym_->inset == "cmex" || sym_->inset == "esint" ||
-                   sym_->extra == "funclim")
+                   sym_->extra == "funclim" ||
+                   (sym_->inset == "stmry" && sym_->extra == "mathop"))
                        scriptable_ = true;
 }
 
@@ -144,7 +145,8 @@ bool InsetMathSymbol::takesLimits() const
                sym_->inset == "cmex" ||
                sym_->inset == "lyxboldsymb" ||
                sym_->inset == "esint" ||
-               sym_->extra == "funclim";
+               sym_->extra == "funclim" ||
+               (sym_->inset == "stmry" && sym_->extra == "mathop");
 }