mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Preferences: When using the Restore to defaults button for the Tweaks, remove all plugin tweaks as well. This allows the user to recover the tweaks file if one of the plugins insert invalid code into the plugin tweaks
This commit is contained in:
parent
5c96cfaee3
commit
b84fef0fb9
@ -202,6 +202,7 @@ class Tweaks(QAbstractListModel, SearchQueryParser): # {{{
|
|||||||
def restore_to_defaults(self):
|
def restore_to_defaults(self):
|
||||||
for r in range(self.rowCount()):
|
for r in range(self.rowCount()):
|
||||||
self.restore_to_default(self.index(r))
|
self.restore_to_default(self.index(r))
|
||||||
|
self.plugin_tweaks = {}
|
||||||
|
|
||||||
def update_tweak(self, idx, varmap):
|
def update_tweak(self, idx, varmap):
|
||||||
tweak = self.data(idx, Qt.UserRole)
|
tweak = self.data(idx, Qt.UserRole)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user