mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-08 17:34:56 -04:00
Open a new tab to begin with, and open a new tab when the last tab is closed
This commit is contained in:
parent
68310070a4
commit
eb78b77073
2 changed files with 6 additions and 5 deletions
|
@ -105,6 +105,10 @@ class TabWidget(QtWidgets.QTabWidget):
|
|||
self.removeTab(index)
|
||||
del self.tabs[tab.tab_id]
|
||||
|
||||
# If the last tab is closed, open a new one
|
||||
if self.count() == 0:
|
||||
self.new_tab_clicked()
|
||||
|
||||
def resizeEvent(self, event):
|
||||
# Make sure to move new tab button on each resize
|
||||
super(TabWidget, self).resizeEvent(event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue