mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
9db407c2ec
commit
78924aa790
@ -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 = _(
|
||||
|
Loading…
x
Reference in New Issue
Block a user