mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 10:37:15 +00:00
Fix removing immutable settings for lists
Settings can have multiple values, although this is not often used and the UI has places where this is not properly honored. Fix the case where we look for and prune uninitialized/immutable settings and be sure to iterate over all the values to avoid a crash. Fixes #11549
This commit is contained in:
parent
673dcb4eef
commit
786e37ce26
@ -164,10 +164,11 @@ class ChirpSettingsEdit(common.ChirpEditor):
|
||||
if isinstance(e, settings.RadioSetting):
|
||||
# Immutable and uninitialized settings don't get sent to the
|
||||
# radio
|
||||
if not e.value.get_mutable():
|
||||
for value in e:
|
||||
if not value.get_mutable():
|
||||
LOG.debug('Skipping immutable %s', e.get_name())
|
||||
del root[e]
|
||||
elif not e.value.initialized:
|
||||
elif not value.initialized:
|
||||
LOG.debug('Skipping uninitialized %s', e.get_name())
|
||||
del root[e]
|
||||
elif isinstance(e, settings.RadioSettingGroup):
|
||||
|
Loading…
Reference in New Issue
Block a user