Fixed progress under Cocoa which always cancelled the job

Yeah, it's funny, same problem as with Qt, but for different reasons.
This commit is contained in:
Virgil Dupras 2013-08-04 09:11:19 -04:00
parent 2fe5cdcf02
commit a15a62f55c
1 changed files with 5 additions and 1 deletions

View File

@ -21,7 +21,11 @@ class ProgressWindow(GUIObject, ThreadedJobPerformer):
self.jobid = None
def cancel(self):
self.job_cancelled = True
# The UI is sometimes a bit buggy and calls cancel() on self.view.close(). We just want to
# make sure that this doesn't lead us to think that the user acually cancelled the task, so
# we verify that the job is still running.
if self._job_running:
self.job_cancelled = True
def pulse(self):
# Call this regularly from the GUI main run loop.