Fix virtual library tabs not being updated when using VL button

This commit is contained in:
Kovid Goyal 2013-08-16 21:43:46 +05:30
parent b1f31d3dce
commit eba16881fd
2 changed files with 4 additions and 0 deletions

View File

@ -345,6 +345,9 @@ class VLTabs(QTabBar): # {{{
self.currentChanged.connect(self.tab_changed)
self.tabButton(all_idx, self.RightSide).setVisible(False)
def update_current(self):
self.rebuild()
def contextMenuEvent(self, ev):
m = QMenu(self)
m.addAction(_('Sort alphabetically'), self.sort_alphabetically)

View File

@ -446,6 +446,7 @@ class SearchRestrictionMixin(object):
db.data.get_base_restriction())
self._apply_search_restriction(db.data.get_search_restriction(),
db.data.get_search_restriction_name())
self.vl_tabs.update_current()
def build_virtual_library_list(self, menu, handler):
db = self.library_view.model().db