Commit dd7c811b00573949544aa48ee75f61bbca5fe6a0

Authored by tatiana
1 parent 77e78c23

FIX: Add new measure after opening inv3 that had 1 measure

Showing 1 changed file with 7 additions and 2 deletions   Show diff stats
invesalius/data/measures.py
... ... @@ -53,6 +53,7 @@ class MeasurementManager(object):
53 53 actors = mr.AddPoint(x, y, z)
54 54 ps.Publisher().sendMessage(("Add actors", m.location),
55 55 (actors, m.slice_number))
  56 + self.current = None
56 57  
57 58  
58 59 def _add_point(self, pubsub_evt):
... ... @@ -91,6 +92,7 @@ class MeasurementManager(object):
91 92 x, y, z = position
92 93 actors = self.current[1].AddPoint(x, y, z)
93 94 self.current[0].points.append(position)
  95 + print "--- actors", actors
94 96 ps.Publisher().sendMessage(("Add actors", location),
95 97 (actors, self.current[0].slice_number))
96 98  
... ... @@ -103,8 +105,11 @@ class MeasurementManager(object):
103 105 self.current[0].value = self.current[1].GetValue()
104 106 type_ = TYPE[type]
105 107 location = LOCATION[location]
106   - value = u"%.2f mm"% self.current[0].value
107   -
  108 + if type == const.LINEAR:
  109 + value = u"%.2f mm"% self.current[0].value
  110 + else:
  111 + value = u"%.2f˚"% self.current[0].value
  112 +
108 113 msg = 'Update measurement info in GUI',
109 114 ps.Publisher().sendMessage(msg,
110 115 (index, name, colour,
... ...