From 3164269793a1f2f6db73919ed1aee9348f022353 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 4 Nov 2013 21:08:28 +0530 Subject: [PATCH] Go back to help screen when last tab is closed --- src/calibre/gui2/tweak_book/ui.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/gui2/tweak_book/ui.py b/src/calibre/gui2/tweak_book/ui.py index b133cc4c41..1ba72fdd46 100644 --- a/src/calibre/gui2/tweak_book/ui.py +++ b/src/calibre/gui2/tweak_book/ui.py @@ -71,6 +71,8 @@ class Central(QStackedWidget): for i in xrange(self.editor_tabs.count()): if self.editor_tabs.widget(i) is editor: self.editor_tabs.removeTab(i) + if self.editor_tabs.count() == 0: + self.setCurrentIndex(0) return True return False