From dd7c811b00573949544aa48ee75f61bbca5fe6a0 Mon Sep 17 00:00:00 2001 From: tatiana Date: Fri, 5 Mar 2010 19:32:14 +0000 Subject: [PATCH] FIX: Add new measure after opening inv3 that had 1 measure --- invesalius/data/measures.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/invesalius/data/measures.py b/invesalius/data/measures.py index 9684b05..37e646a 100644 --- a/invesalius/data/measures.py +++ b/invesalius/data/measures.py @@ -53,6 +53,7 @@ class MeasurementManager(object): actors = mr.AddPoint(x, y, z) ps.Publisher().sendMessage(("Add actors", m.location), (actors, m.slice_number)) + self.current = None def _add_point(self, pubsub_evt): @@ -91,6 +92,7 @@ class MeasurementManager(object): x, y, z = position actors = self.current[1].AddPoint(x, y, z) self.current[0].points.append(position) + print "--- actors", actors ps.Publisher().sendMessage(("Add actors", location), (actors, self.current[0].slice_number)) @@ -103,8 +105,11 @@ class MeasurementManager(object): self.current[0].value = self.current[1].GetValue() type_ = TYPE[type] location = LOCATION[location] - value = u"%.2f mm"% self.current[0].value - + if type == const.LINEAR: + value = u"%.2f mm"% self.current[0].value + else: + value = u"%.2f˚"% self.current[0].value + msg = 'Update measurement info in GUI', ps.Publisher().sendMessage(msg, (index, name, colour, -- libgit2 0.21.2