]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDecoration.cpp
Fix assertion when checking if change in selection
[lyx.git] / src / mathed / InsetMathDecoration.cpp
index 47792498915e4737d09c02d77a391e2d57703417..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;
 }
 
 
@@ -209,7 +215,7 @@ namespace {
                        buildTranslationMap(t);
                return t;
        }
-}
+} // namespace
 
 void InsetMathDecoration::mathmlize(MathStream & os) const
 {