diff --git a/invesalius/data/measures.py b/invesalius/data/measures.py index 18b26f4..ccb5856 100644 --- a/invesalius/data/measures.py +++ b/invesalius/data/measures.py @@ -835,7 +835,7 @@ class AngularMeasure(object): points = [] for p in self.points: coord.SetValue(p) - cx, cy = coord.GetComputedDisplayValue(canvas.viewer.slice_data.renderer) + cx, cy = coord.GetComputedDisplayValue(canvas.evt_renderer) # canvas.draw_circle((cx, cy), 2.5) points.append((cx, cy)) diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index fb5662d..d3fd971 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -1549,7 +1549,10 @@ class Viewer(wx.Panel): self.slice_data.renderer.AddActor(actor) for (m, mr) in self.measures.get(self.orientation, self.slice_data.number): - self.canvas.draw_list.remove(mr) + try: + self.canvas.draw_list.remove(mr) + except ValueError: + pass for (m, mr) in self.measures.get(self.orientation, index): if m.visible: -- libgit2 0.21.2