]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_nestinset.C
whichFont down to 5.3%
[lyx.git] / src / mathed / math_nestinset.C
index 59b974f523b39df882f9f11d7cb23e9be7db8f61..12a5c2e618fc7e6f1841f65ce6c029f09506f14f 100644 (file)
@@ -3,6 +3,7 @@
 #endif
 
 #include "math_nestinset.h"
+#include "math_cursor.h"
 #include "math_mathmlstream.h"
 #include "debug.h"
 
@@ -51,8 +52,12 @@ void MathNestInset::substitute(MathMacro const & m)
 
 void MathNestInset::metrics(MathMetricsInfo const & mi) const
 {
-       for (idx_type i = 0; i < nargs(); ++i)
-               xcell(i).metrics(mi);
+       MathMetricsInfo m = mi;
+       m.inset = this;
+       for (idx_type i = 0; i < nargs(); ++i) {
+               m.idx = i;
+               xcell(i).metrics(m);
+       }
 }
 
 
@@ -178,3 +183,10 @@ bool MathNestInset::contains(MathArray const & ar)
                        return true;
        return false;
 }
+
+
+bool MathNestInset::editing() const
+{
+       return mathcursor && mathcursor->isInside(this);
+}
+