From a0197e49d760ea20f27bea1614b116e0bdbcdcc1 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 28 Nov 2019 14:58:04 -0800 Subject: [PATCH] Cleanup tabs on cleanup --- onionshare_gui/main_window.py | 4 +++- onionshare_gui/tab/tab.py | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/onionshare_gui/main_window.py b/onionshare_gui/main_window.py index 14328b26..d3457583 100644 --- a/onionshare_gui/main_window.py +++ b/onionshare_gui/main_window.py @@ -286,5 +286,7 @@ class MainWindow(QtWidgets.QMainWindow): e.accept() def cleanup(self): + for index in range(self.tabs.count()): + tab = self.tabs.widget(index) + tab.cleanup() self.common.gui.onion.cleanup() - # TODO: Run the tab's cleanup diff --git a/onionshare_gui/tab/tab.py b/onionshare_gui/tab/tab.py index db10ba97..35a527c1 100644 --- a/onionshare_gui/tab/tab.py +++ b/onionshare_gui/tab/tab.py @@ -538,7 +538,6 @@ class Tab(QtWidgets.QWidget): if not self.timer.isActive(): self.timer.start(500) self.get_mode().on_reload_settings() - self.get_mode().primary_action.show() def close_tab(self): self.common.log("Tab", "close_tab")