Commit 4fbc22e1c7ec1bc721ee288f7cd614eb7ae9746d
1 parent
1b75e4d8
Exists in
rotvol
Closing reorient image dialog when out of reorient style
Showing
2 changed files
with
5 additions
and
0 deletions
Show diff stats
invesalius/data/styles.py
... | ... | @@ -1445,6 +1445,7 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): |
1445 | 1445 | self.viewer.slice_.rotations = [0, 0, 0] |
1446 | 1446 | self.viewer.slice_.q_orientation = np.array((1, 0, 0, 0)) |
1447 | 1447 | self._discard_buffers() |
1448 | + Publisher.sendMessage('Close reorient dialog') | |
1448 | 1449 | Publisher.sendMessage('Show current mask') |
1449 | 1450 | |
1450 | 1451 | def OnLeftClick(self, obj, evt): | ... | ... |
invesalius/gui/dialogs.py
... | ... | @@ -1607,6 +1607,7 @@ class ReorientImageDialog(wx.Dialog): |
1607 | 1607 | |
1608 | 1608 | def _bind_events(self): |
1609 | 1609 | Publisher.subscribe(self._update_angles, 'Update reorient angles') |
1610 | + Publisher.subscribe(self._close_dialog, 'Close reorient dialog') | |
1610 | 1611 | |
1611 | 1612 | def _bind_events_wx(self): |
1612 | 1613 | self.btnapply.Bind(wx.EVT_BUTTON, self.apply_reorientation) |
... | ... | @@ -1618,6 +1619,9 @@ class ReorientImageDialog(wx.Dialog): |
1618 | 1619 | self.angley.SetValue("%.2f" % np.rad2deg(angley)) |
1619 | 1620 | self.anglez.SetValue("%.2f" % np.rad2deg(anglez)) |
1620 | 1621 | |
1622 | + def _close_dialog(self, pubsub_evt): | |
1623 | + self.Destroy() | |
1624 | + | |
1621 | 1625 | def apply_reorientation(self, evt): |
1622 | 1626 | Publisher.sendMessage('Apply reorientation') |
1623 | 1627 | self.Close() | ... | ... |