Commit 49a3eccf7b29df5a6cc69095ed4a92c5d8e28b82
1 parent
6a01b805
Exists in
rotvol
Updating all orientations only when the user release the mouse button
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
invesalius/data/styles.py
@@ -1492,7 +1492,10 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): | @@ -1492,7 +1492,10 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): | ||
1492 | 1492 | ||
1493 | def OnLeftRelease(self, obj, evt): | 1493 | def OnLeftRelease(self, obj, evt): |
1494 | self.dragging = False | 1494 | self.dragging = False |
1495 | - self.to_rot = False | 1495 | + |
1496 | + if self.to_rot: | ||
1497 | + Publisher.sendMessage('Reload actual slice') | ||
1498 | + self.to_rot = False | ||
1496 | 1499 | ||
1497 | def OnMouseMove(self, obj, evt): | 1500 | def OnMouseMove(self, obj, evt): |
1498 | """ | 1501 | """ |
@@ -1607,7 +1610,7 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): | @@ -1607,7 +1610,7 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): | ||
1607 | 1610 | ||
1608 | self._discard_buffers() | 1611 | self._discard_buffers() |
1609 | self.viewer.slice_.current_mask.clear_history() | 1612 | self.viewer.slice_.current_mask.clear_history() |
1610 | - Publisher.sendMessage('Reload actual slice') | 1613 | + Publisher.sendMessage('Reload actual slice %s' % self.viewer.orientation) |
1611 | self.p0 = self.get_image_point_coord(x, y, z) | 1614 | self.p0 = self.get_image_point_coord(x, y, z) |
1612 | 1615 | ||
1613 | def get_image_point_coord(self, x, y, z): | 1616 | def get_image_point_coord(self, x, y, z): |
invesalius/data/viewer_slice.py
@@ -706,6 +706,7 @@ class Viewer(wx.Panel): | @@ -706,6 +706,7 @@ class Viewer(wx.Panel): | ||
706 | Publisher.subscribe(self.OnSwapVolumeAxes, 'Swap volume axes') | 706 | Publisher.subscribe(self.OnSwapVolumeAxes, 'Swap volume axes') |
707 | 707 | ||
708 | Publisher.subscribe(self.ReloadActualSlice, 'Reload actual slice') | 708 | Publisher.subscribe(self.ReloadActualSlice, 'Reload actual slice') |
709 | + Publisher.subscribe(self.ReloadActualSlice, 'Reload actual slice %s' % self.orientation) | ||
709 | Publisher.subscribe(self.OnUpdateScroll, 'Update scroll') | 710 | Publisher.subscribe(self.OnUpdateScroll, 'Update scroll') |
710 | 711 | ||
711 | 712 |