Commit 9d34e641 authored by sumpfralle's avatar sumpfralle

the progress counter should transmit the "cancel requested" state


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@376 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 3b69d897
...@@ -37,7 +37,10 @@ class ProgressCounter: ...@@ -37,7 +37,10 @@ class ProgressCounter:
def increment(self): def increment(self):
self.current_value += 1 self.current_value += 1
if self.update_callback: if self.update_callback:
self.update_callback(percent=self.get_percent()) # "True" means: "quit requested via GUI"
return self.update_callback(percent=self.get_percent())
else:
return False
def get_percent(self): def get_percent(self):
return 100.0 * self.current_value / self.max_value return 100.0 * self.current_value / self.max_value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment