mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 03:37:28 -03:00
Merge pull request #1659 from onionshare/fix-autoconnect-with-persistent-tabs
Check current index tab for autoconnect
This commit is contained in:
commit
e6e1d33a8f
1 changed files with 13 additions and 2 deletions
|
@ -169,8 +169,19 @@ class TabWidget(QtWidgets.QTabWidget):
|
|||
self.open_connection_tab()
|
||||
|
||||
def check_autoconnect_tab(self):
|
||||
if type(self.tabs[0]) is AutoConnectTab:
|
||||
self.tabs[0].check_autoconnect()
|
||||
tab = self.widget(self.currentIndex())
|
||||
if not tab:
|
||||
self.common.log(
|
||||
"TabWidget",
|
||||
"check_autoconnect",
|
||||
f"tab at index {self.currentIndex()} does not exist",
|
||||
)
|
||||
return
|
||||
|
||||
tab_id = tab.tab_id
|
||||
self.common.log("TabWidget", "check_autoconnect", f"Tab to check autoconnect: {tab_id}")
|
||||
if type(self.tabs[tab_id]) is AutoConnectTab:
|
||||
self.tabs[tab_id].check_autoconnect()
|
||||
|
||||
def load_tab(self, mode_settings_id):
|
||||
# Load the tab's mode settings
|
||||
|
|
Loading…
Reference in a new issue