Desctivates canvas callbacks in drawing tool when deactivated.

This commit is contained in:
jpcaram
2015-02-12 17:06:29 -05:00
parent 247901655c
commit 8da39d54d4
5 changed files with 96 additions and 37 deletions

View File

@@ -10,6 +10,7 @@ class FCProcess(object):
"done": []
}
self.descr = descr
self.status = "Active"
def __del__(self):
# print "#######################"
@@ -17,6 +18,18 @@ class FCProcess(object):
# print "#######################"
self.done()
def __enter__(self):
pass
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type is not None:
print "Abnormal termination of process!"
print exc_type
print exc_val
print exc_tb
self.done()
def done(self):
# print "FCProcess.done()"
for fcn in self.callbacks["done"]:
@@ -32,6 +45,9 @@ class FCProcess(object):
except ValueError:
pass
def set_status(self, status_string):
self.status = status_string
def status_msg(self):
return self.descr