From 65deb0f7faac21c89612b6a7f4891afe6bec0cbd Mon Sep 17 00:00:00 2001 From: jeepingben Date: Sun, 24 Mar 2024 20:34:39 -0400 Subject: [PATCH] Multiple custom power curves 4460 (#4461) In cases where this config was loaded and is being saved again, preserve the virtual power definition string. --- src/Gui/Pages.cpp | 2 +- src/Train/DeviceConfiguration.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gui/Pages.cpp b/src/Gui/Pages.cpp index 03df934d7..d9b4aa514 100644 --- a/src/Gui/Pages.cpp +++ b/src/Gui/Pages.cpp @@ -696,7 +696,7 @@ bool deviceModel::setData(const QModelIndex &index, const QVariant &value, int r case 3 : // Profile p.deviceProfile = value.toString(); break; - case 4 : // Profile + case 4 : // Virtual p.postProcess = value.toInt(); break; } diff --git a/src/Train/DeviceConfiguration.cpp b/src/Train/DeviceConfiguration.cpp index 4e9559db4..35f300b95 100644 --- a/src/Train/DeviceConfiguration.cpp +++ b/src/Train/DeviceConfiguration.cpp @@ -169,7 +169,7 @@ DeviceConfigurations::writeConfig(QList Configuration) bool isPredefinedPostProcess = vptm.IsPredefinedVirtualPowerTrainerIndex(postProcess); int postProcessStoreValue = postProcess; - QString s = ""; + QString s = Configuration.at(i).virtualPowerDefinitionString; if (!isPredefinedPostProcess) { postProcessStoreValue = 0;