diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index 11796ce..623edf9 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -1445,6 +1445,7 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): self.viewer.slice_.rotations = [0, 0, 0] self.viewer.slice_.q_orientation = np.array((1, 0, 0, 0)) self._discard_buffers() + Publisher.sendMessage('Close reorient dialog') Publisher.sendMessage('Show current mask') def OnLeftClick(self, obj, evt): diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 0e1a0fa..9ae9d95 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -1607,6 +1607,7 @@ class ReorientImageDialog(wx.Dialog): def _bind_events(self): Publisher.subscribe(self._update_angles, 'Update reorient angles') + Publisher.subscribe(self._close_dialog, 'Close reorient dialog') def _bind_events_wx(self): self.btnapply.Bind(wx.EVT_BUTTON, self.apply_reorientation) @@ -1618,6 +1619,9 @@ class ReorientImageDialog(wx.Dialog): self.angley.SetValue("%.2f" % np.rad2deg(angley)) self.anglez.SetValue("%.2f" % np.rad2deg(anglez)) + def _close_dialog(self, pubsub_evt): + self.Destroy() + def apply_reorientation(self, evt): Publisher.sendMessage('Apply reorientation') self.Close() -- libgit2 0.21.2