Commit 9c210a9d514e493deed4b972edd7c6baa4ffe3ac

Authored by tfmoraes
1 parent 8306b0f2

Only setting the cursor coordinates to world coordinate of the center of pixel s…

…lice when the user is moving and above the slice image
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
invesalius/data/viewer_slice.py
@@ -600,7 +600,8 @@ class Viewer(wx.Panel): @@ -600,7 +600,8 @@ 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 - coord = self.slice_data.actor.GetInput().GetPoint(position) 603 + if position != -1:
  604 + coord = self.slice_data.actor.GetInput().GetPoint(position)
604 slice_data.cursor.SetPosition(coord) 605 slice_data.cursor.SetPosition(coord)
605 slice_data.cursor.SetEditionPosition( 606 slice_data.cursor.SetEditionPosition(
606 self.get_coordinate_cursor_edition(slice_data)) 607 self.get_coordinate_cursor_edition(slice_data))