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):
|
def preferences(self):
|
||||||
p = Preferences(self.gui)
|
p = Preferences(self.gui)
|
||||||
if p.exec_() == p.Accepted:
|
ret = p.exec_()
|
||||||
if p.dictionaries_changed:
|
if p.dictionaries_changed:
|
||||||
dictionaries.clear_caches()
|
dictionaries.clear_caches()
|
||||||
dictionaries.initialize(force=True) # Reread user dictionaries
|
dictionaries.initialize(force=True) # Reread user dictionaries
|
||||||
for ed in editors.itervalues():
|
if ret == p.Accepted:
|
||||||
ed.apply_settings(dictionaries_changed=p.dictionaries_changed)
|
|
||||||
setup_cssutils_serialization()
|
setup_cssutils_serialization()
|
||||||
self.gui.apply_settings()
|
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):
|
def mark_requested(self, name, action):
|
||||||
self.commit_dirty_opf()
|
self.commit_dirty_opf()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user