commit 6cfd733dea70bf26c512dea8491f79f68cb512e6
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Wed Sep 5 17:29:43 2018 +0200

    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 908a887..1262370 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 9e58065..a5d5e9c 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;

Reply via email to