From 9c210a9d514e493deed4b972edd7c6baa4ffe3ac Mon Sep 17 00:00:00 2001 From: tfmoraes Date: Tue, 3 May 2011 18:52:00 +0000 Subject: [PATCH] Only setting the cursor coordinates to world coordinate of the center of pixel slice when the user is moving and above the slice image --- invesalius/data/viewer_slice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index aede870..6bc6c47 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -600,7 +600,8 @@ class Viewer(wx.Panel): coord = self.get_coordinate_cursor() position = self.slice_data.actor.GetInput().FindPoint(coord) - coord = self.slice_data.actor.GetInput().GetPoint(position) + if position != -1: + coord = self.slice_data.actor.GetInput().GetPoint(position) slice_data.cursor.SetPosition(coord) slice_data.cursor.SetEditionPosition( self.get_coordinate_cursor_edition(slice_data)) -- libgit2 0.21.2