mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-11 15:29:38 -05:00
Reload settings in connection tab when tor settings tab closed
This commit is contained in:
parent
df85ea0f60
commit
24152e8b4d
@ -138,7 +138,7 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||
"""
|
||||
self.common.log("AutoConnectTab", "autoconnect_checking")
|
||||
if self.auto_connect_enabled:
|
||||
self.enable_autoconnect_checkbox.setCheckState(QtCore.Qt.Checked)
|
||||
self.enable_autoconnect_checkbox.setChecked(True)
|
||||
self.connect_clicked()
|
||||
|
||||
def toggle_auto_connect(self):
|
||||
@ -191,3 +191,8 @@ class AutoConnectTab(QtWidgets.QWidget):
|
||||
self.connect_button.show()
|
||||
self.configure_button.show()
|
||||
self.error_label.setText(msg)
|
||||
|
||||
def reload_settings(self):
|
||||
self.curr_settings.load()
|
||||
self.auto_connect_enabled = self.curr_settings.get("auto_connect")
|
||||
self.enable_autoconnect_checkbox.setChecked(self.auto_connect_enabled)
|
||||
|
@ -382,6 +382,9 @@ class TabWidget(QtWidgets.QTabWidget):
|
||||
|
||||
def close_tor_settings_tab(self):
|
||||
self.common.log("TabWidget", "close_tor_settings_tab")
|
||||
for tab_id in self.tabs:
|
||||
if type(self.tabs[tab_id]) is AutoConnectTab:
|
||||
self.tabs[tab_id].reload_settings()
|
||||
for tab_id in self.tabs:
|
||||
if type(self.tabs[tab_id]) is TorSettingsTab:
|
||||
index = self.indexOf(self.tabs[tab_id])
|
||||
|
Loading…
Reference in New Issue
Block a user