[chirp_devel] [PATCH] Fix RadioSettingValueMap marked changed upon creation. #4371
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1483751453 28800 # Fri Jan 06 17:10:53 2017 -0800 # Node ID e4e34bc9abd7869827b8a0bc8d22d89f9399bfe3 # Parent fdd8842179cf344575e2ac69db391ec0190a0289 Fix RadioSettingValueMap marked changed upon creation. #4371
RadioSettingValueMap instances were marked changed regardless of whether they were actually changed. This was due to calling set_value() from within __init__(). This fix reintializes has_changed to False at the end of __init__() so that RadioSetting.has_changed() is accurate.
diff -r fdd8842179cf -r e4e34bc9abd7 chirp/settings.py --- a/chirp/settings.py Fri Jan 06 16:53:55 2017 -0800 +++ b/chirp/settings.py Fri Jan 06 17:10:53 2017 -0800 @@ -235,6 +235,7 @@ self.set_mem_val(mem_val) elif user_option is not None: self.set_value(user_option) + self._has_changed = False
def set_mem_val(self, mem_val): """Change setting to User Option that corresponds to 'mem_val'"""
participants (1)
-
Tom Hayward