Go back to help screen when last tab is closed

This commit is contained in:
Kovid Goyal 2013-11-04 21:08:28 +05:30
parent f3a660fec3
commit 3164269793

View File

@ -71,6 +71,8 @@ class Central(QStackedWidget):
for i in xrange(self.editor_tabs.count()): for i in xrange(self.editor_tabs.count()):
if self.editor_tabs.widget(i) is editor: if self.editor_tabs.widget(i) is editor:
self.editor_tabs.removeTab(i) self.editor_tabs.removeTab(i)
if self.editor_tabs.count() == 0:
self.setCurrentIndex(0)
return True return True
return False return False