fix(cpn): profile conversion of models and settings (#5151)

This commit is contained in:
Neil Horne
2024-06-12 10:20:49 +10:00
committed by GitHub
parent 4be97eca96
commit 199e09ed4e
6 changed files with 34 additions and 16 deletions
+2 -1
View File
@@ -377,7 +377,7 @@ bool RawSource::isAvailable(const ModelData * const model, const GeneralSettings
RawSource RawSource::convert(RadioDataConversionState & cstate)
{
cstate.setItemType(tr("SRC"), 1);
cstate.setItemType(tr("Source"), 1);
RadioDataConversionState::LogField oldData(index, toString(cstate.fromModel(), cstate.fromGS(), cstate.fromType));
if (type == SOURCE_TYPE_INPUT)
@@ -389,6 +389,7 @@ RawSource RawSource::convert(RadioDataConversionState & cstate)
if (index < 0 || !isAvailable(nullptr, cstate.toGS(), cstate.toType)) {
cstate.setInvalid(oldData);
clear(); // no source is safer than an invalid one
cstate.setConverted(oldData, RadioDataConversionState::LogField(index, tr("None")));
}
return *this;