From: Jean-Marc Lasgouttes Date: Wed, 5 Sep 2018 15:29:43 +0000 (+0200) Subject: Fixup 7b7ed64a: allow toggling limits of (over|under)brace X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3069 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6cfd733dea70bf26c512dea8491f79f68cb512e6;p=features.git Fixup 7b7ed64a: allow toggling limits of (over|under)brace --- diff --git a/src/mathed/InsetMathDecoration.cpp b/src/mathed/InsetMathDecoration.cpp index 908a887eeb..1262370953 100644 --- a/src/mathed/InsetMathDecoration.cpp +++ b/src/mathed/InsetMathDecoration.cpp @@ -55,11 +55,17 @@ bool InsetMathDecoration::upper() const } +MathClass InsetMathDecoration::mathClass() const +{ + if (key_->name == "overbrace" || key_->name == "underbrace") + return MC_OP; + return MC_ORD; +} + + bool InsetMathDecoration::isScriptable() const { - return - key_->name == "overbrace" || - key_->name == "underbrace"; + return mathClass() == MC_OP; } diff --git a/src/mathed/InsetMathDecoration.h b/src/mathed/InsetMathDecoration.h index 9e58065ee3..a5d5e9c9b8 100644 --- a/src/mathed/InsetMathDecoration.h +++ b/src/mathed/InsetMathDecoration.h @@ -38,6 +38,8 @@ public: /// void infoize(odocstream & os) const; /// + MathClass mathClass() const; + /// bool isScriptable() const; /// void validate(LaTeXFeatures & features) const;