Commit d18d5670bd56dabec78beaeb0fad8eda8909c07e
1 parent
6d6bf302
Exists in
master
and in
68 other branches
ENH: WHen project is closed, check off label on raycasing types menu
Showing
3 changed files
with
8 additions
and
1 deletions
Show diff stats
invesalius/data/viewer_volume.py
invesalius/data/vtk_utils.py
... | ... | @@ -132,7 +132,7 @@ class Text(object): |
132 | 132 | # With some encoding in some dicom fields (like name) raises a |
133 | 133 | # UnicodeEncodeError because they have non-ascii characters. To avoid |
134 | 134 | # that we encode in utf-8. |
135 | - self.mapper.SetInput(value.encode("utf-8")) | |
135 | + self.mapper.SetInput(value.encode("cp1252")) | |
136 | 136 | |
137 | 137 | def SetPosition(self, position): |
138 | 138 | self.actor.GetPositionCoordinate().SetValue(position[0], | ... | ... |
invesalius/gui/default_viewers.py
... | ... | @@ -390,6 +390,11 @@ class VolumeToolPanel(wx.Panel): |
390 | 390 | def __bind_events(self): |
391 | 391 | ps.Publisher().subscribe(self.ChangeButtonColour, |
392 | 392 | 'Change volume viewer gui colour') |
393 | + ps.Publisher().subscribe(self.DisablePreset, 'Close project data') | |
394 | + | |
395 | + def DisablePreset(self, pubsub_evt): | |
396 | + self.off_item.Check(1) | |
397 | + | |
393 | 398 | |
394 | 399 | def __bind_events_wx(self): |
395 | 400 | self.button_slice_plane.Bind(wx.EVT_LEFT_DOWN, self.OnButtonSlicePlane) |
... | ... | @@ -422,6 +427,7 @@ class VolumeToolPanel(wx.Panel): |
422 | 427 | item = wx.MenuItem(menu, id, name, kind=wx.ITEM_RADIO) |
423 | 428 | menu.AppendItem(item) |
424 | 429 | if name == const.RAYCASTING_OFF_LABEL: |
430 | + self.off_item = item | |
425 | 431 | item.Check(1) |
426 | 432 | ID_TO_NAME[id] = name |
427 | 433 | ... | ... |