diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index 48f6f46..f77877d 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -302,6 +302,8 @@ class Slice(object): self.hue_range = (0, 0) self.value_range = (0, 1) + self.interaction_style.Reset() + Publisher.sendMessage('Select first item from slice menu') def __set_current_mask_threshold_limits(self, pubsub_evt): diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index 634e2c0..4464b9d 100755 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -355,7 +355,7 @@ class Viewer(wx.Panel): def OnCloseProject(self, pubsub_evt): if self.raycasting_volume: self.raycasting_volume = False - + if self.slice_plane: self.slice_plane.Disable() self.slice_plane.DeletePlanes() @@ -365,6 +365,10 @@ class Viewer(wx.Panel): self.on_wl = False self.slice_plane = 0 + self.interaction_style.Reset() + self.SetInteractorStyle(const.STATE_DEFAULT) + self._last_state = const.STATE_DEFAULT + def OnHideText(self, pubsub_evt): self.text.Hide() self.interactor.Render() diff --git a/invesalius/style.py b/invesalius/style.py index 8deb829..3c78950 100644 --- a/invesalius/style.py +++ b/invesalius/style.py @@ -114,3 +114,8 @@ class StyleStateManager(object): max_level = max(self.stack.keys()) state = self.stack[max_level] return state + + def Reset(self): + self.stack = {} + self.stack[const.STYLE_LEVEL[const.STATE_DEFAULT]] = \ + const.STATE_DEFAULT -- libgit2 0.21.2