diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index 8718060..395a8dd 100755 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -133,6 +133,7 @@ class Viewer(wx.Panel): self.raycasting_volume = False if self.slice_plane: self.Disable() + #slice_plane_...SetInteractor(self.interactor._Iren) self.mouse_pressed = 0 self.on_wl = False diff --git a/invesalius/data/vtk_utils.py b/invesalius/data/vtk_utils.py index 332b723..71983ed 100644 --- a/invesalius/data/vtk_utils.py +++ b/invesalius/data/vtk_utils.py @@ -132,7 +132,7 @@ class Text(object): # With some encoding in some dicom fields (like name) raises a # UnicodeEncodeError because they have non-ascii characters. To avoid # that we encode in utf-8. - self.mapper.SetInput(value.encode("utf-8")) + self.mapper.SetInput(value.encode("cp1252")) def SetPosition(self, position): self.actor.GetPositionCoordinate().SetValue(position[0], diff --git a/invesalius/gui/default_viewers.py b/invesalius/gui/default_viewers.py index 1583820..a2e8764 100755 --- a/invesalius/gui/default_viewers.py +++ b/invesalius/gui/default_viewers.py @@ -390,6 +390,11 @@ class VolumeToolPanel(wx.Panel): def __bind_events(self): ps.Publisher().subscribe(self.ChangeButtonColour, 'Change volume viewer gui colour') + ps.Publisher().subscribe(self.DisablePreset, 'Close project data') + + def DisablePreset(self, pubsub_evt): + self.off_item.Check(1) + def __bind_events_wx(self): self.button_slice_plane.Bind(wx.EVT_LEFT_DOWN, self.OnButtonSlicePlane) @@ -422,6 +427,7 @@ class VolumeToolPanel(wx.Panel): item = wx.MenuItem(menu, id, name, kind=wx.ITEM_RADIO) menu.AppendItem(item) if name == const.RAYCASTING_OFF_LABEL: + self.off_item = item item.Check(1) ID_TO_NAME[id] = name -- libgit2 0.21.2