From 2f36a67ff9fe1f3cf5494c6020976e9662a3975f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 24 Aug 2013 14:15:09 +0530 Subject: [PATCH] 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) --- src/calibre/gui2/init.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/init.py b/src/calibre/gui2/init.py index da89d7b764..4d15279f63 100644 --- a/src/calibre/gui2/init.py +++ b/src/calibre/gui2/init.py @@ -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)