Merge pull request #854 from gullradriel/converter-fix-disable

Fix to force converter icon to be displayed if enabled
This commit is contained in:
gullradriel 2023-03-27 23:06:32 +02:00 committed by GitHub
commit 7ef98f7741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,6 +337,10 @@ SetConverterSettingsView::SetConverterSettingsView(NavigationView& nav) {
check_show_converter.set_value(!portapack::persistent_memory::config_hide_converter());
check_show_converter.on_select = [this](Checkbox&, bool v) {
portapack::persistent_memory::set_config_hide_converter(!v);
if( !v )
{
check_converter.set_value(false);
}
// Retune to take converter change in account
receiver_model.set_tuning_frequency( portapack::persistent_memory::tuned_frequency() );
//Refresh status bar with/out converter
@ -346,6 +350,11 @@ SetConverterSettingsView::SetConverterSettingsView(NavigationView& nav) {
check_converter.set_value(portapack::persistent_memory::config_converter());
check_converter.on_select = [this](Checkbox&, bool v) {
if( v )
{
check_show_converter.set_value(true);
portapack::persistent_memory::set_config_hide_converter(false);
}
portapack::persistent_memory::set_config_converter(v);
// Retune to take converter change in account
receiver_model.set_tuning_frequency( portapack::persistent_memory::tuned_frequency() );