Commit b52bcd19 authored by sumpfralle's avatar sumpfralle

added an "update" method to the ProgessCounter to allow GUI updates without...

added an "update" method to the ProgessCounter to allow GUI updates without incrementing the counter


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@825 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 6e4fee92
...@@ -84,6 +84,9 @@ class ProgressCounter: ...@@ -84,6 +84,9 @@ class ProgressCounter:
def increment(self, increment=1): def increment(self, increment=1):
self.current_value += increment self.current_value += increment
return self.update()
def update(self):
if self.update_callback: if self.update_callback:
# "True" means: "quit requested via GUI" # "True" means: "quit requested via GUI"
return self.update_callback(percent=self.get_percent()) return self.update_callback(percent=self.get_percent())
......
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