Eliminate 2 superfluous calls to recount on startup -- 1 when not using a startup restriction and another immediately after initializing the model.

This commit is contained in:
Charles Haley 2010-12-14 18:05:54 +00:00
parent 43b2b04f52
commit 8f2171033a
2 changed files with 3 additions and 1 deletions

View File

@ -101,6 +101,7 @@ class TagsView(QTreeView): # {{{
hidden_categories=self.hidden_categories,
search_restriction=None,
drag_drop_finished=self.drag_drop_finished)
self.pane_is_visible = True # because TagsModel.init did a recount
self.sort_by = sort_by
self.tag_match = tag_match
self.db = db

View File

@ -234,7 +234,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
######################### Search Restriction ##########################
SearchRestrictionMixin.__init__(self)
self.apply_named_search_restriction(db.prefs['gui_restriction'])
if db.prefs['gui_restriction']:
self.apply_named_search_restriction(db.prefs['gui_restriction'])
########################### Cover Flow ################################