Commit 330f8139f9bca4875856cc1c022d3b5fd4f1aedc
1 parent
738cfc05
Exists in
master
and in
68 other branches
FIX: Hide hiden surfaces on inv3 [fix: #226]
Showing
2 changed files
with
11 additions
and
3 deletions
Show diff stats
invesalius/data/measures.py
| ... | ... | @@ -54,6 +54,13 @@ class MeasurementManager(object): |
| 54 | 54 | (actors, m.slice_number)) |
| 55 | 55 | self.current = None |
| 56 | 56 | |
| 57 | + if not m.is_shown: | |
| 58 | + mr.SetVisibility(False) | |
| 59 | + if m.location == const.SURFACE: | |
| 60 | + ps.Publisher().sendMessage('Render volume viewer') | |
| 61 | + else: | |
| 62 | + ps.Publisher().sendMessage('Update slice viewer') | |
| 63 | + | |
| 57 | 64 | def _add_point(self, pubsub_evt): |
| 58 | 65 | position = pubsub_evt.data[0] |
| 59 | 66 | type = pubsub_evt.data[1] # Linear or Angular |
| ... | ... | @@ -174,7 +181,7 @@ class Measurement(): |
| 174 | 181 | self.type = const.LINEAR # ANGULAR |
| 175 | 182 | self.slice_number = 0 |
| 176 | 183 | self.points = [] |
| 177 | - self.is_shown = False | |
| 184 | + self.is_shown = True | |
| 178 | 185 | |
| 179 | 186 | def Load(self, info): |
| 180 | 187 | self.index = info["index"] | ... | ... |
invesalius/gui/data_notebook.py
| ... | ... | @@ -1085,7 +1085,7 @@ class MeasuresListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): |
| 1085 | 1085 | index_list = self._list_index.keys() |
| 1086 | 1086 | self._list_index[m.index] = image_index |
| 1087 | 1087 | |
| 1088 | - colour = [255*i for i in m.colour] | |
| 1088 | + colour = [255*c for c in m.colour] | |
| 1089 | 1089 | type = TYPE[m.type] |
| 1090 | 1090 | location = LOCATION[m.location] |
| 1091 | 1091 | if m.type == const.LINEAR: |
| ... | ... | @@ -1094,7 +1094,8 @@ class MeasuresListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): |
| 1094 | 1094 | value = (u"%.2f°") % m.value |
| 1095 | 1095 | self.InsertNewItem(m.index, m.name, colour, type, location, value) |
| 1096 | 1096 | |
| 1097 | - | |
| 1097 | + if not m.is_shown: | |
| 1098 | + self.SetItemImage(i, False) | |
| 1098 | 1099 | |
| 1099 | 1100 | def AddItem_(self, pubsub_evt): |
| 1100 | 1101 | index = pubsub_evt.data[0] | ... | ... |