fix possible error with accessing nonexistent setting
This commit is contained in:
parent
84dd7e8e24
commit
8d12a729b8
1 changed files with 1 additions and 1 deletions
|
@ -491,7 +491,7 @@ def apply_setting(key, value):
|
|||
return
|
||||
|
||||
valtype = type(opts.data_labels[key].default)
|
||||
oldval = opts.data[key]
|
||||
oldval = opts.data.get(key, None)
|
||||
opts.data[key] = valtype(value) if valtype != type(None) else value
|
||||
if oldval != value and opts.data_labels[key].onchange is not None:
|
||||
opts.data_labels[key].onchange()
|
||||
|
|
Loading…
Reference in a new issue