diff --git a/invesalius/data/measures.py b/invesalius/data/measures.py index 7eb7c81..7de5f29 100644 --- a/invesalius/data/measures.py +++ b/invesalius/data/measures.py @@ -137,7 +137,7 @@ class MeasurementManager(object): (actors, m.slice_number)) self.current = None - if not m.is_shown: + if not m.visible: mr.SetVisibility(False) if m.location == const.SURFACE: Publisher.sendMessage('Render volume viewer') @@ -307,7 +307,7 @@ class MeasurementManager(object): def _set_visibility(self, pubsub_evt): index, visibility = pubsub_evt.data m, mr = self.measures[index] - m.is_shown = visibility + m.visible = visibility mr.SetVisibility(visibility) if m.location == const.SURFACE: Publisher.sendMessage('Render volume viewer') @@ -349,7 +349,7 @@ class Measurement(): self.type = const.LINEAR # ANGULAR self.slice_number = 0 self.points = [] - self.is_shown = True + self.visible = True def Load(self, info): self.index = info["index"] @@ -360,7 +360,7 @@ class Measurement(): self.type = info["type"] self.slice_number = info["slice_number"] self.points = info["points"] - self.is_shown = info["visible"] + self.visible = info["visible"] class CirclePointRepresentation(object): """ diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index 69616e3..b5aef45 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -218,6 +218,8 @@ class CanvasRendererCTX: for (m, mr) in self.viewer.measures.get(self.viewer.orientation, self.viewer.slice_data.number): lines = [] + if not m.visible: + continue for p in m.points: coord.SetValue(p) cx, cy = coord.GetComputedDisplayValue(self.viewer.slice_data.renderer) diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index 2c17910..77dfb1b 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -1105,7 +1105,7 @@ class MeasuresListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): value = (u"%.2f°") % m.value self.InsertNewItem(m.index, m.name, colour, location, type, value) - if not m.is_shown: + if not m.visible: self.SetItemImage(i, False) def AddItem_(self, pubsub_evt): diff --git a/invesalius/project.py b/invesalius/project.py index 96ae4d1..0969fb8 100644 --- a/invesalius/project.py +++ b/invesalius/project.py @@ -190,7 +190,7 @@ class Project(object): item["type"] = m.type item["slice_number"] = m.slice_number item["points"] = m.points - item["visible"] = m.is_shown + item["visible"] = m.visible measures[str(m.index)] = item return measures -- libgit2 0.21.2