Set self.torr_settings_tab to None _before_ deleting the tab

This commit is contained in:
Micah Lee 2021-10-26 22:12:22 -07:00
parent bde94d37fc
commit de3c95cc50
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -311,13 +311,13 @@ class TabWidget(QtWidgets.QTabWidget):
):
self.common.log("TabWidget", "closing a settings tab")
if type(self.tabs[tab_id]) is TorSettingsTab:
self.tor_settings_tab = None
# Remove the tab
self.removeTab(index)
del self.tabs[tab.tab_id]
if type(self.tabs[tab_id]) is TorSettingsTab:
self.tor_settings_tab = None
# If the last tab is closed, open a new one
if self.count() == 0:
self.new_tab_clicked()