fix(cpn): profile conversion of models and settings (#5151)
This commit is contained in:
@@ -206,7 +206,7 @@ RawSwitch RawSwitch::convert(RadioDataConversionState & cstate)
|
||||
if (!index)
|
||||
return *this;
|
||||
|
||||
cstate.setItemType(tr("SW"), 2);
|
||||
cstate.setItemType(tr("Switch"), 2);
|
||||
RadioDataConversionState::LogField oldData(index, toString(cstate.fromType, cstate.fromGS(), cstate.fromModel()));
|
||||
|
||||
int newIdx = 0;
|
||||
@@ -223,6 +223,7 @@ RawSwitch RawSwitch::convert(RadioDataConversionState & cstate)
|
||||
if (newIdx < 0 || !isAvailable(nullptr, cstate.toGS(), cstate.toType)) {
|
||||
cstate.setInvalid(oldData);
|
||||
clear(); // no switch is safer than an invalid one
|
||||
cstate.setConverted(oldData, RadioDataConversionState::LogField(index, tr("None")));
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user