]> git.lyx.org Git - features.git/commitdiff
Fixup 7b7ed64a: allow toggling limits of (over|under)brace
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Sep 2018 15:29:43 +0000 (17:29 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Sep 2018 15:31:05 +0000 (17:31 +0200)
src/mathed/InsetMathDecoration.cpp
src/mathed/InsetMathDecoration.h

index 908a887eebb5bbea01d8a944d3885293b42a2acc..1262370953fe4a89c9808cc94dc2c7a3a27a59b0 100644 (file)
@@ -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;
 }
 
 
index 9e58065ee3f8c76bcc9106edf2c495c317f97088..a5d5e9c9b8d53677a3fa8a87ca9665a8143cf378 100644 (file)
@@ -38,6 +38,8 @@ public:
        ///
        void infoize(odocstream & os) const;
        ///
+       MathClass mathClass() const;
+       ///
        bool isScriptable() const;
        ///
        void validate(LaTeXFeatures & features) const;