From 330f8139f9bca4875856cc1c022d3b5fd4f1aedc Mon Sep 17 00:00:00 2001 From: tatiana Date: Mon, 8 Mar 2010 14:44:30 +0000 Subject: [PATCH] FIX: Hide hiden surfaces on inv3 [fix: #226] --- invesalius/data/measures.py | 9 ++++++++- invesalius/gui/data_notebook.py | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/invesalius/data/measures.py b/invesalius/data/measures.py index 62b849e..dd0444a 100644 --- a/invesalius/data/measures.py +++ b/invesalius/data/measures.py @@ -54,6 +54,13 @@ class MeasurementManager(object): (actors, m.slice_number)) self.current = None + if not m.is_shown: + mr.SetVisibility(False) + if m.location == const.SURFACE: + ps.Publisher().sendMessage('Render volume viewer') + else: + ps.Publisher().sendMessage('Update slice viewer') + def _add_point(self, pubsub_evt): position = pubsub_evt.data[0] type = pubsub_evt.data[1] # Linear or Angular @@ -174,7 +181,7 @@ class Measurement(): self.type = const.LINEAR # ANGULAR self.slice_number = 0 self.points = [] - self.is_shown = False + self.is_shown = True def Load(self, info): self.index = info["index"] diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index d79f41f..5d65f40 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -1085,7 +1085,7 @@ class MeasuresListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): index_list = self._list_index.keys() self._list_index[m.index] = image_index - colour = [255*i for i in m.colour] + colour = [255*c for c in m.colour] type = TYPE[m.type] location = LOCATION[m.location] if m.type == const.LINEAR: @@ -1094,7 +1094,8 @@ class MeasuresListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): value = (u"%.2f°") % m.value self.InsertNewItem(m.index, m.name, colour, type, location, value) - + if not m.is_shown: + self.SetItemImage(i, False) def AddItem_(self, pubsub_evt): index = pubsub_evt.data[0] -- libgit2 0.21.2