VL tabs: Change name of all books tab when hidden VL is activated

Virtual Library tabs: If the user activates a hidden tab via the Virtual
Library button, change the name of the All Books tab to reflect the
hidden virtual library. Fixes #1216174 [Wrong VL tab activitad when the right one is hidden](https://bugs.launchpad.net/calibre/+bug/1216174)
This commit is contained in:
Kovid Goyal 2013-08-24 14:15:09 +05:30
parent f0e040639c
commit 2f36a67ff9

View File

@ -334,6 +334,8 @@ class VLTabs(QTabBar): # {{{
if not vl:
all_idx = i
self.setCurrentIndex(all_idx if current_idx is None else current_idx)
if current_idx is None and current_lib:
self.setTabText(all_idx, current_lib)
self.currentChanged.connect(self.tab_changed)
try:
self.tabButton(all_idx, self.RightSide).setVisible(False)