From e56423905d9c3d4b65c34b713c20b454ddf6ebf4 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 5 Feb 2018 11:10:55 +0200 Subject: [PATCH] Ignore full name and description for known measurements. ref #804. --HG-- branch : develop --- src/app/tape/tmainwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index aa523f652..193829fad 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -3163,12 +3163,13 @@ void TMainWindow::ImportIndividualMeasurements(const QxtCsvModel &csv) measurement.name = CheckMName(qApp->TrVars()->MFromUser(csv.text(i, 0).simplified())); measurement.value = VTranslateVars::TryFormulaFromUser(csv.text(i, 1), qApp->Settings()->GetOsSeparator()); - if (columns >= 3) + const bool custom = csv.text(i, 0).simplified().startsWith(CustomMSign); + if (columns >= 3 && not custom) { measurement.fullName = csv.text(i, 2).simplified(); } - if (columns >= 4) + if (columns >= 4 && not custom) { measurement.description = csv.text(i, 3).simplified(); } @@ -3262,12 +3263,13 @@ void TMainWindow::ImportMultisizeMeasurements(const QxtCsvModel &csv) measurement.sizeIncrease = ConverToDouble(csv.text(i, 3), tr("Cannot convert size increase value to double in column 4.")); - if (columns >= 5) + const bool custom = csv.text(i, 0).simplified().startsWith(CustomMSign); + if (columns >= 5 && not custom) { measurement.fullName = csv.text(i, 4).simplified(); } - if (columns >= 6) + if (columns >= 6 && not custom) { measurement.description = csv.text(i, 5).simplified(); }