mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
Fixes #2092456 [Check Library produces NoneType error](https://bugs.launchpad.net/calibre/+bug/2092456)
This commit is contained in:
commit
379e66a321
@ -1171,13 +1171,13 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
||||
|
||||
def _save_tb_state(self, gprefs):
|
||||
self.tb_widget.save_state(gprefs)
|
||||
if gprefs['tag_browser_restore_tree_expansion']:
|
||||
if gprefs['tag_browser_restore_tree_expansion'] and self.current_db is not None:
|
||||
tv_saved_expansions = gprefs.get('tags_view_saved_expansions', {})
|
||||
tv_saved_expansions.update({self.current_db.library_id: self.tb_widget.get_expansion_state()})
|
||||
gprefs['tags_view_saved_expansions'] = tv_saved_expansions
|
||||
|
||||
def _restore_tb_expansion_state(self):
|
||||
if gprefs['tag_browser_restore_tree_expansion']:
|
||||
if gprefs['tag_browser_restore_tree_expansion'] and self.current_db is not None:
|
||||
tv_saved_expansions = gprefs.get('tags_view_saved_expansions', {})
|
||||
self.tb_widget.restore_expansion_state(tv_saved_expansions.get(self.current_db.library_id))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user