mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Apply changes to dictionary settings even if the user clicks cancel on the preferences dialog
This commit is contained in:
parent
0f09f5670e
commit
7281b0a316
@ -117,14 +117,16 @@ class Boss(QObject):
|
||||
|
||||
def preferences(self):
|
||||
p = Preferences(self.gui)
|
||||
if p.exec_() == p.Accepted:
|
||||
ret = p.exec_()
|
||||
if p.dictionaries_changed:
|
||||
dictionaries.clear_caches()
|
||||
dictionaries.initialize(force=True) # Reread user dictionaries
|
||||
for ed in editors.itervalues():
|
||||
ed.apply_settings(dictionaries_changed=p.dictionaries_changed)
|
||||
if ret == p.Accepted:
|
||||
setup_cssutils_serialization()
|
||||
self.gui.apply_settings()
|
||||
if ret == p.Accepted or p.dictionaries_changed:
|
||||
for ed in editors.itervalues():
|
||||
ed.apply_settings(dictionaries_changed=p.dictionaries_changed)
|
||||
|
||||
def mark_requested(self, name, action):
|
||||
self.commit_dirty_opf()
|
||||
|
Loading…
x
Reference in New Issue
Block a user