X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fformula.C;h=a4185a9cdcc6275b026264a8c3993c6139a967c2;hb=fbb9a99704dc0b67a37b7638973ab802dc7bbffe;hp=acd8c3c2efc879d069492ff2544d217f5b388b14;hpb=29d6854e98d9cf3008bea6c967c7c8b70298bf9b;p=lyx.git diff --git a/src/mathed/formula.C b/src/mathed/formula.C index acd8c3c2ef..a4185a9cdc 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -227,7 +227,7 @@ InsetFormula::InsetFormula(MathParInset * p) par = is_multiline(p->GetType()) ? new MathMatrixInset(static_cast(p)): - new MathParInset(p); + new MathParInset(*p); // mathcursor = 0; disp_flag = (par->GetType()>0); @@ -305,7 +305,8 @@ void InsetFormula::Read(Buffer const *, LyXLex & lex) // Silly hack to read labels. mathed_label.erase(); - mathed_parse(0, 0, &par); + MathedArray ar; + mathed_parse(ar, 0, &par); par->Metrics(); disp_flag = (par->GetType() > 0); @@ -537,9 +538,6 @@ void InsetFormula::display(bool dspf) par->SetStyle(LM_ST_DISPLAY); } else { if (is_multiline(par->GetType())) { - MathParInset * p = new MathParInset(par); - delete par; - par = p; if (mathcursor) mathcursor->SetPar(par); } @@ -1227,7 +1225,7 @@ InsetFormula::LocalDispatch(BufferView * bv, int action, string const & arg) static void mathedValidate(LaTeXFeatures & features, MathParInset * par) { - MathedIter it(par->GetData()); + MathedIter it(&par->GetData()); while (it.OK() && !(features.binom && features.boldsymbol)) { if (it.IsInset()) {