]> 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 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;
 }