From 78924aa7902af0b726f70b06e3615570f6045ff6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Apr 2012 21:31:54 +0530 Subject: [PATCH] ... --- src/calibre/gui2/convert/search_and_replace.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/calibre/gui2/convert/search_and_replace.py b/src/calibre/gui2/convert/search_and_replace.py index c86ecf5457..2229b28997 100644 --- a/src/calibre/gui2/convert/search_and_replace.py +++ b/src/calibre/gui2/convert/search_and_replace.py @@ -246,6 +246,7 @@ class SearchAndReplaceWidget(Widget, Ui_Form): if rest: super(SearchAndReplaceWidget, self).apply_recommendations(rest) + self.set_value(self.opt_search_replace, None) if new_val is None and legacy: for i in range(1, 4): x = 'sr%d'%i @@ -256,14 +257,6 @@ class SearchAndReplaceWidget(Widget, Ui_Form): if new_val is not None: self.set_value(self.opt_search_replace, new_val) - def restore_defaults(self, get_option): - super(SearchAndReplaceWidget, self).restore_defaults(get_option) - # This method is only called to set global defaults, not per book - # defaults. Therefore, we ensure that the value is None. Without this, - # apply_recommendations will not work, as it only applies the value if - # it is not None. - self.set_value(self.opt_search_replace, None) - def setup_help_handler(self, g, help): if g is self.opt_search_replace: self.search_replace._help = _(