Don't close last tab

This commit is contained in:
Florian Bruhin 2014-01-17 08:28:04 +01:00
parent 26df5a8076
commit c392993c79

View File

@ -24,9 +24,13 @@ class TabbedBrowser(TabWidget):
@pyqtSlot()
def close_act(self):
idx = self.currentIndex()
self.tabs.pop(idx)
self.removeTab(idx)
if len(self.tabs) > 1:
idx = self.currentIndex()
self.tabs.pop(idx)
self.removeTab(idx)
else:
# FIXME
pass
class BrowserTab(QWebView):
def __init__(self, parent):