Commit 5206c47950feac524bf0ef68600e840ab8d25302
1 parent
60d2aa6a
Exists in
master
and in
5 other branches
Not trying to update the 3D slice when the user is editing a mask
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
invesalius/data/viewer_slice.py
@@ -785,7 +785,7 @@ class Viewer(wx.Panel): | @@ -785,7 +785,7 @@ class Viewer(wx.Panel): | ||
785 | position, radius, self.orientation) | 785 | position, radius, self.orientation) |
786 | 786 | ||
787 | # TODO: To create a new function to reload images to viewer. | 787 | # TODO: To create a new function to reload images to viewer. |
788 | - self.OnScrollBar() | 788 | + self.OnScrollBar(update3D=False) |
789 | 789 | ||
790 | else: | 790 | else: |
791 | self.interactor.Render() | 791 | self.interactor.Render() |
@@ -1345,10 +1345,11 @@ class Viewer(wx.Panel): | @@ -1345,10 +1345,11 @@ class Viewer(wx.Panel): | ||
1345 | ps.Publisher().sendMessage('Change slice from slice plane',\ | 1345 | ps.Publisher().sendMessage('Change slice from slice plane',\ |
1346 | (self.orientation, pos)) | 1346 | (self.orientation, pos)) |
1347 | 1347 | ||
1348 | - def OnScrollBar(self, evt=None): | 1348 | + def OnScrollBar(self, evt=None, update3D=True): |
1349 | pos = self.scroll.GetThumbPosition() | 1349 | pos = self.scroll.GetThumbPosition() |
1350 | self.set_slice_number(pos) | 1350 | self.set_slice_number(pos) |
1351 | - self.UpdateSlice3D(pos) | 1351 | + if update3D: |
1352 | + self.UpdateSlice3D(pos) | ||
1352 | if self.state == const.SLICE_STATE_CROSS: | 1353 | if self.state == const.SLICE_STATE_CROSS: |
1353 | # Update other slice's cross according to the new focal point from | 1354 | # Update other slice's cross according to the new focal point from |
1354 | # the actual orientation. | 1355 | # the actual orientation. |