]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_matrixinset.C
Use only the first label when mutating eqnarray to display formula.
[features.git] / src / mathed / math_matrixinset.C
index c185e874e3eea30d32b58a10381256e630695e7c..10c7e0234ed27591225a2e52a80d9ee75b64a637 100644 (file)
@@ -476,13 +476,20 @@ void MathMatrixInset::mutate(short newtype)
                        switch (newtype) {
                                case LM_OT_SIMPLE:
                                case LM_OT_EQUATION: {
-                                       string label;
                                        bool allnonum = true;
                                        for (int r = 0; r < nrows(); ++r) {
-                                               label += label_[r];
                                                if (!nonum_[r])
                                                        allnonum = false;
                                        }
+
+                                       string label;
+                                       for (int r = 0; r < nrows(); ++r) {
+                                               if (!label_[r].empty()) {
+                                                       label = label_[r];
+                                                       break;
+                                               }
+                                       }
+
                                        glueall();
                                        mutate(newtype);
                                        label_[0] = label;