|
@@ -195,13 +195,8 @@ class InterfaceCore():
|
|
|
lname = self.find((event.x, event.y))
|
|
|
|
|
|
attrs = self.mv.read_available_attributes(lname)
|
|
|
- print("Managing " + str(attrs))
|
|
|
-
|
|
|
- if not attrs:
|
|
|
- print("No attrs to manage!")
|
|
|
|
|
|
for attr, t in attrs:
|
|
|
- print("Reading data from " + str(attr))
|
|
|
old_value = self.mv.read_attribute(lname, attr)
|
|
|
if old_value == "None":
|
|
|
old_value = None
|
|
@@ -211,6 +206,8 @@ class InterfaceCore():
|
|
|
new_value = float(new_value)
|
|
|
elif t == "String":
|
|
|
new_value = str(new_value)
|
|
|
+ elif t == "Natural":
|
|
|
+ new_value = int(new_value)
|
|
|
else:
|
|
|
print("Got unknown type: " + str(t))
|
|
|
self.mv.set_attribute(lname, attr, new_value)
|
|
@@ -245,7 +242,6 @@ class InterfaceCore():
|
|
|
|
|
|
if matches:
|
|
|
minimal_distance, name = sorted(matches)[0]
|
|
|
- print("Distance to " + name + " is " + str(minimal_distance))
|
|
|
if minimal_distance <= 0:
|
|
|
return name
|
|
|
|
|
@@ -255,8 +251,6 @@ class InterfaceCore():
|
|
|
source = self.find(start)
|
|
|
target = self.find(end)
|
|
|
|
|
|
- print("Connect from %s to %s" % (source, target))
|
|
|
-
|
|
|
if source and target:
|
|
|
global name
|
|
|
self.mv.instantiate_link(str(name), "Transition", source, target)
|
|
@@ -343,8 +337,6 @@ def update_graphs():
|
|
|
lookup[v] = k
|
|
|
a.clear()
|
|
|
a.plot(times, events, linestyle="none", marker="o")
|
|
|
- print("Lookup: " + str(lookup))
|
|
|
- print("Events:" + str(events))
|
|
|
f.get_axes()[0].set_yticks(range(-2, len(lookup) + 2))
|
|
|
f.get_axes()[0].set_yticklabels(["", ""] + lookup + ["", ""])
|
|
|
fcanvas.draw()
|