diff --git a/src/musredit_qt5/mupp/Pmupp.cpp b/src/musredit_qt5/mupp/Pmupp.cpp index af247c74..e908a08f 100644 --- a/src/musredit_qt5/mupp/Pmupp.cpp +++ b/src/musredit_qt5/mupp/Pmupp.cpp @@ -594,7 +594,12 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool & run.SetName(fln); // read header information + // step over initial comments line = in.readLine(); + while (line.isEmpty() || line.startsWith("%") || line.startsWith("#")) + line = in.readLine(); + + // handle header #if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) token = line.split(QRegExp("\\s+"), QString::SkipEmptyParts); #else diff --git a/src/musredit_qt6/mupp/Pmupp.cpp b/src/musredit_qt6/mupp/Pmupp.cpp index 41c0924c..3210c7a1 100644 --- a/src/musredit_qt6/mupp/Pmupp.cpp +++ b/src/musredit_qt6/mupp/Pmupp.cpp @@ -702,7 +702,12 @@ PmuppCollection PParamDataHandler::ReadColumnParamFile(const QString fln, bool & run.SetName(fln); // read header information + // step over initial comments line = in.readLine(); + while (line.isEmpty() || line.startsWith("%") || line.startsWith("#")) + line = in.readLine(); + + // handle header token = line.split(QRegularExpression("\\s+"), Qt::SkipEmptyParts); QVector headerInfo;