Commit 994b42f7283e80459b78b3d6a0f7e50071522ea2
1 parent
c6f28051
Exists in
master
and in
26 other branches
renaming is_shown to visible in the measurements
Showing
4 changed files
with
8 additions
and
6 deletions
Show diff stats
invesalius/data/measures.py
... | ... | @@ -137,7 +137,7 @@ class MeasurementManager(object): |
137 | 137 | (actors, m.slice_number)) |
138 | 138 | self.current = None |
139 | 139 | |
140 | - if not m.is_shown: | |
140 | + if not m.visible: | |
141 | 141 | mr.SetVisibility(False) |
142 | 142 | if m.location == const.SURFACE: |
143 | 143 | Publisher.sendMessage('Render volume viewer') |
... | ... | @@ -307,7 +307,7 @@ class MeasurementManager(object): |
307 | 307 | def _set_visibility(self, pubsub_evt): |
308 | 308 | index, visibility = pubsub_evt.data |
309 | 309 | m, mr = self.measures[index] |
310 | - m.is_shown = visibility | |
310 | + m.visible = visibility | |
311 | 311 | mr.SetVisibility(visibility) |
312 | 312 | if m.location == const.SURFACE: |
313 | 313 | Publisher.sendMessage('Render volume viewer') |
... | ... | @@ -349,7 +349,7 @@ class Measurement(): |
349 | 349 | self.type = const.LINEAR # ANGULAR |
350 | 350 | self.slice_number = 0 |
351 | 351 | self.points = [] |
352 | - self.is_shown = True | |
352 | + self.visible = True | |
353 | 353 | |
354 | 354 | def Load(self, info): |
355 | 355 | self.index = info["index"] |
... | ... | @@ -360,7 +360,7 @@ class Measurement(): |
360 | 360 | self.type = info["type"] |
361 | 361 | self.slice_number = info["slice_number"] |
362 | 362 | self.points = info["points"] |
363 | - self.is_shown = info["visible"] | |
363 | + self.visible = info["visible"] | |
364 | 364 | |
365 | 365 | class CirclePointRepresentation(object): |
366 | 366 | """ | ... | ... |
invesalius/data/viewer_slice.py
... | ... | @@ -218,6 +218,8 @@ class CanvasRendererCTX: |
218 | 218 | |
219 | 219 | for (m, mr) in self.viewer.measures.get(self.viewer.orientation, self.viewer.slice_data.number): |
220 | 220 | lines = [] |
221 | + if not m.visible: | |
222 | + continue | |
221 | 223 | for p in m.points: |
222 | 224 | coord.SetValue(p) |
223 | 225 | cx, cy = coord.GetComputedDisplayValue(self.viewer.slice_data.renderer) | ... | ... |
invesalius/gui/data_notebook.py
... | ... | @@ -1105,7 +1105,7 @@ class MeasuresListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): |
1105 | 1105 | value = (u"%.2f°") % m.value |
1106 | 1106 | self.InsertNewItem(m.index, m.name, colour, location, type, value) |
1107 | 1107 | |
1108 | - if not m.is_shown: | |
1108 | + if not m.visible: | |
1109 | 1109 | self.SetItemImage(i, False) |
1110 | 1110 | |
1111 | 1111 | def AddItem_(self, pubsub_evt): | ... | ... |
invesalius/project.py
... | ... | @@ -190,7 +190,7 @@ class Project(object): |
190 | 190 | item["type"] = m.type |
191 | 191 | item["slice_number"] = m.slice_number |
192 | 192 | item["points"] = m.points |
193 | - item["visible"] = m.is_shown | |
193 | + item["visible"] = m.visible | |
194 | 194 | measures[str(m.index)] = item |
195 | 195 | return measures |
196 | 196 | ... | ... |