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):
|
def commit_scrolling(onchange):
|
||||||
sd = get_session_data()
|
sd = get_session_data()
|
||||||
container = get_container()
|
container = get_container()
|
||||||
|
changed = False
|
||||||
for control in container.querySelectorAll('input[name]'):
|
for control in container.querySelectorAll('input[name]'):
|
||||||
name = control.getAttribute('name')
|
name = control.getAttribute('name')
|
||||||
val = control.checked
|
val = control.checked
|
||||||
sd.set(name, None if val is defaults[name] else val)
|
if val is not sd.get(name):
|
||||||
onchange()
|
sd.set(name, val)
|
||||||
|
changed = True
|
||||||
|
if changed:
|
||||||
|
onchange()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user