mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 17:24:20 +02:00
Viewer: Fix preferences under Scrolling behavior not being saved correctly
This commit is contained in:
parent
3faa52ee58
commit
4a074eb2bf
1 changed files with 6 additions and 2 deletions
|
|
@ -54,8 +54,12 @@ def cb(name, text):
|
|||
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…
Reference in a new issue