From e0230196c284b8ab09f28bf5a094b359381bc1b5 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Tue, 2 Jul 2024 09:26:44 +0200 Subject: [PATCH] improved dat-file reading for mupp. --- src/musredit_qt5/mupp/Pmupp.cpp | 7 ++++++- src/musredit_qt6/mupp/Pmupp.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/musredit_qt5/mupp/Pmupp.cpp b/src/musredit_qt5/mupp/Pmupp.cpp index b54c0cb9..2f3a3910 100644 --- a/src/musredit_qt5/mupp/Pmupp.cpp +++ b/src/musredit_qt5/mupp/Pmupp.cpp @@ -656,12 +656,17 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool & param.SetName(headerInfo[i]); param.SetValue(dval); if (i+1 < token.size()) { - if (headerCode[i+1] == PMUPP_VALUE) { + if ((headerCode[i+1] == PMUPP_VALUE) || (headerCode[i+1] == PMUPP_RUN)) { param.SetNegErr(0.0); param.SetPosErr(0.0); run.AddParam(param); param.ResetParam(); } + } else { // last token + param.SetNegErr(0.0); + param.SetPosErr(0.0); + run.AddParam(param); + param.ResetParam(); } } else if (headerCode[i] == PMUPP_POSNEGERR) { param.SetPosErr(dval); diff --git a/src/musredit_qt6/mupp/Pmupp.cpp b/src/musredit_qt6/mupp/Pmupp.cpp index 67ac977b..7b135caf 100644 --- a/src/musredit_qt6/mupp/Pmupp.cpp +++ b/src/musredit_qt6/mupp/Pmupp.cpp @@ -645,12 +645,17 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool & param.SetName(headerInfo[i]); param.SetValue(dval); if (i+1 < token.size()) { - if (headerCode[i+1] == PMUPP_VALUE) { + if ((headerCode[i+1] == PMUPP_VALUE) || (headerCode[i+1] == PMUPP_RUN)) { param.SetNegErr(0.0); param.SetPosErr(0.0); run.AddParam(param); param.ResetParam(); } + } else { // last token + param.SetNegErr(0.0); + param.SetPosErr(0.0); + run.AddParam(param); + param.ResetParam(); } } else if (headerCode[i] == PMUPP_POSNEGERR) { param.SetPosErr(dval);