Commit bd4b822d27889acf66168483834df98a5d8df96d
1 parent
9c210a9d
Exists in
master
and in
5 other branches
Added a comment to explain the last commit modification
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
invesalius/data/viewer_slice.py
@@ -600,6 +600,10 @@ class Viewer(wx.Panel): | @@ -600,6 +600,10 @@ class Viewer(wx.Panel): | ||
600 | 600 | ||
601 | coord = self.get_coordinate_cursor() | 601 | coord = self.get_coordinate_cursor() |
602 | position = self.slice_data.actor.GetInput().FindPoint(coord) | 602 | position = self.slice_data.actor.GetInput().FindPoint(coord) |
603 | + | ||
604 | + # when position == -1 the cursos is not over the image, so is not | ||
605 | + # necessary to set the cursor position to world coordinate center of | ||
606 | + # pixel from slice image. | ||
603 | if position != -1: | 607 | if position != -1: |
604 | coord = self.slice_data.actor.GetInput().GetPoint(position) | 608 | coord = self.slice_data.actor.GetInput().GetPoint(position) |
605 | slice_data.cursor.SetPosition(coord) | 609 | slice_data.cursor.SetPosition(coord) |