From dbaff77e7158ba5237dc687275b51c5421ad93fe Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 5 Sep 2018 17:29:43 +0200 Subject: [PATCH] Fixup 7b7ed64a: allow toggling limits of (over|under)brace --- src/mathed/InsetMathDecoration.cpp | 12 +++++++++--- src/mathed/InsetMathDecoration.h | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) 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; -- 2.39.5