fix(color): Changes to widget options not always being saved (#2475)
* fixes issue https://github.com/EdgeTX/edgetx/issues where a change of the source value in widget settings was not written back to the model .yml file. * fixes https://github.com/EdgeTX/edgetx/pull/2475 extended force write to .yml to all widget settings option types * fixes issue https://github.com/EdgeTX/edgetx/issues/2465 where a change of the source value in widget settings was not written back to the model .yml file. * https://github.com/EdgeTX/edgetx/issues/2465 extended force write to .yml to all widget settings option types * removed unnecessary SET_DIRTY() for ModelTextEdit() as it is already handled by ModelTextEdit() changed indent for SET_DIRTY() in lambda for Choice() * removed unnecessary SET_DIRTY() for ModelTextEdit() as it is already handled by ModelTextEdit() changed indent for SET_DIRTY() in lambda for Choice()
This commit is contained in:
@@ -69,6 +69,7 @@ WidgetSettings::WidgetSettings(Window* parent, Widget* widget) :
|
||||
},
|
||||
[=](int32_t newValue) {
|
||||
widget->getOptionValue(optIdx)->signedValue = newValue;
|
||||
SET_DIRTY();
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -81,6 +82,7 @@ WidgetSettings::WidgetSettings(Window* parent, Widget* widget) :
|
||||
[=](int16_t newValue) {
|
||||
widget->getOptionValue(optIdx)->unsignedValue =
|
||||
(uint32_t)newValue;
|
||||
SET_DIRTY();
|
||||
});
|
||||
break;
|
||||
|
||||
@@ -128,6 +130,7 @@ WidgetSettings::WidgetSettings(Window* parent, Widget* widget) :
|
||||
[=](int newValue) { // setValue
|
||||
widget->getOptionValue(optIdx)->unsignedValue =
|
||||
(uint32_t)newValue;
|
||||
SET_DIRTY();
|
||||
});
|
||||
|
||||
tmChoice->setTextHandler([](int value) {
|
||||
@@ -146,6 +149,7 @@ WidgetSettings::WidgetSettings(Window* parent, Widget* widget) :
|
||||
[=](int16_t newValue) { // setValue
|
||||
widget->getOptionValue(optIdx)->unsignedValue =
|
||||
(uint32_t)newValue;
|
||||
SET_DIRTY();
|
||||
});
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user