Desctivates canvas callbacks in drawing tool when deactivated.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user