mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Fix preferences under Scrolling behavior not being saved correctly
This commit is contained in:
parent
3faa52ee58
commit
4a074eb2bf
@ -54,8 +54,12 @@ develop = create_scrolling_panel
|
||||
def commit_scrolling(onchange):
|
||||
sd = get_session_data()
|
||||
container = get_container()
|
||||
changed = False
|
||||
for control in container.querySelectorAll('input[name]'):
|
||||
name = control.getAttribute('name')
|
||||
val = control.checked
|
||||
sd.set(name, None if val is defaults[name] else val)
|
||||
onchange()
|
||||
if val is not sd.get(name):
|
||||
sd.set(name, val)
|
||||
changed = True
|
||||
if changed:
|
||||
onchange()
|
||||
|
Loading…
x
Reference in New Issue
Block a user