mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
Fixed job UI cancellation
It was broken since the modernization.
This commit is contained in:
parent
c93a88f8b0
commit
21c64545e5
@ -21,7 +21,7 @@ class ProgressWindow(GUIObject, ThreadedJobPerformer):
|
||||
self.jobid = None
|
||||
|
||||
def cancel(self):
|
||||
self.user_cancelled = True
|
||||
self.job_cancelled = True
|
||||
|
||||
def pulse(self):
|
||||
# Call this regularly from the GUI main run loop.
|
||||
@ -44,7 +44,6 @@ class ProgressWindow(GUIObject, ThreadedJobPerformer):
|
||||
# target is a function with its first argument being a Job. It can then be followed by other
|
||||
# arguments which are passed as `args`.
|
||||
self.jobid = jobid
|
||||
self.user_cancelled = False
|
||||
self.progressdesc_textfield.text = ''
|
||||
j = self.create_job()
|
||||
args = tuple([j] + list(args))
|
||||
|
@ -24,6 +24,7 @@ class ProgressWindow(QProgressDialog):
|
||||
self.setAutoClose(False)
|
||||
self._timer = QTimer()
|
||||
self._timer.timeout.connect(self.model.pulse)
|
||||
self.canceled.connect(self.model.cancel)
|
||||
|
||||
# --- Callbacks
|
||||
def refresh(self): # Labels
|
||||
|
Loading…
x
Reference in New Issue
Block a user