diff --git a/bauh/view/qt/thread.py b/bauh/view/qt/thread.py index fac21dff..a4bafb1e 100644 --- a/bauh/view/qt/thread.py +++ b/bauh/view/qt/thread.py @@ -30,6 +30,7 @@ class AsyncAction(QThread, ProcessWatcher): super(AsyncAction, self).__init__() self.wait_confirmation = False self.confirmation_res = None + self.stop = False def request_confirmation(self, title: str, body: str, components: List[InputViewComponent] = None, confirmation_label: str = None, deny_label: str = None) -> bool: self.wait_confirmation = True @@ -64,6 +65,9 @@ class AsyncAction(QThread, ProcessWatcher): def change_progress(self, val: int): self.signal_progress.emit(val) + def should_stop(self): + return self.stop + class UpdateSelectedApps(AsyncAction):