From e321726f352c021da1b34da362036eadebf31897 Mon Sep 17 00:00:00 2001 From: Dekel Tsur Date: Mon, 9 Jul 2001 16:42:22 +0000 Subject: [PATCH] Use only the first label when mutating eqnarray to display formula. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2211 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 5 +++++ src/mathed/math_matrixinset.C | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 2d5597af55..8ce2221ac3 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2001-07-09 Dekel Tsur + + * math_matrixinset.C (mutate): Use only the first label when + mutating eqnarray to display formula. + 2001-07-09 Juergen Vigna * formulabase.C (mathDispatchCreation): don't do anything with the diff --git a/src/mathed/math_matrixinset.C b/src/mathed/math_matrixinset.C index c185e874e3..10c7e0234e 100644 --- a/src/mathed/math_matrixinset.C +++ b/src/mathed/math_matrixinset.C @@ -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; -- 2.39.2