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:
Kovid Goyal 2014-02-13 13:37:57 +05:30
parent 5c96cfaee3
commit b84fef0fb9

View File

@ -202,6 +202,7 @@ class Tweaks(QAbstractListModel, SearchQueryParser): # {{{
def restore_to_defaults(self):
for r in range(self.rowCount()):
self.restore_to_default(self.index(r))
self.plugin_tweaks = {}
def update_tweak(self, idx, varmap):
tweak = self.data(idx, Qt.UserRole)