mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
4e54cd601a
@ -234,6 +234,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
'The option to have un-accented characters match accented characters has no effect'
|
||||
' if you also turn on case-sensitive searching. So only turn on one of those options'), show=True)
|
||||
raise AbortCommit()
|
||||
restart = ConfigWidgetBase.commit(self)
|
||||
if self.gst_changed:
|
||||
self.db.new_api.set_pref('grouped_search_terms', self.gst)
|
||||
self.db.field_metadata.add_grouped_search_terms(self.gst)
|
||||
@ -252,7 +253,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
else:
|
||||
cats.discard('search')
|
||||
self.db.new_api.set_pref('categories_using_hierarchy', list(cats))
|
||||
return ConfigWidgetBase.commit(self)
|
||||
return restart
|
||||
|
||||
def refresh_gui(self, gui):
|
||||
gui.refresh_search_bar_widgets()
|
||||
@ -260,8 +261,8 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
gui.current_db.new_api.clear_caches()
|
||||
set_use_primary_find_in_search(prefs['use_primary_find_in_search'])
|
||||
gui.set_highlight_only_button_icon()
|
||||
if self.muc_changed:
|
||||
gui.tags_view.recount()
|
||||
if self.gst_changed or self.muc_changed:
|
||||
gui.tags_view.model().reset_tag_browser()
|
||||
gui.search.search_as_you_type(config['search_as_you_type'])
|
||||
gui.search.do_search()
|
||||
|
||||
|
@ -715,6 +715,7 @@ class TagsView(QTreeView): # {{{
|
||||
index = self.indexAt(point)
|
||||
self.context_menu = QMenu(self)
|
||||
added_show_hidden_categories = False
|
||||
key = None
|
||||
|
||||
def add_show_hidden_categories():
|
||||
nonlocal added_show_hidden_categories
|
||||
@ -1046,7 +1047,7 @@ class TagsView(QTreeView): # {{{
|
||||
|
||||
# partioning. If partitioning is active, provide a way to turn it on or
|
||||
# off for this category.
|
||||
if gprefs['tags_browser_partition_method'] != 'disable':
|
||||
if gprefs['tags_browser_partition_method'] != 'disable' and key is not None:
|
||||
m = self.context_menu
|
||||
p = self.db.prefs.get('tag_browser_dont_collapse', gprefs['tag_browser_dont_collapse'])
|
||||
if key in p:
|
||||
|
Loading…
x
Reference in New Issue
Block a user