From 4b4020c629dc2c3e3db7f2ec4516f79e46aa0fec Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 27 Oct 2019 14:23:45 -0700 Subject: [PATCH] When you open a new tab, make that the current tab --- onionshare_gui/tab_widget.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onionshare_gui/tab_widget.py b/onionshare_gui/tab_widget.py index 48388144..be2916e4 100644 --- a/onionshare_gui/tab_widget.py +++ b/onionshare_gui/tab_widget.py @@ -85,7 +85,8 @@ class TabWidget(QtWidgets.QTabWidget): def new_tab_clicked(self): # Add a new tab tab = Tab(self.common, self.system_tray, self.status_bar) - self.addTab(tab, "New Tab") + index = self.addTab(tab, "New Tab") + self.setCurrentIndex(index) class TabBar(QtWidgets.QTabBar):