Skip to content
Snippets Groups Projects
Commit d79fab4e authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Initial cursor location correctly set to centre of slice

parent 6d8d73ae
No related branches found
No related tags found
No related merge requests found
...@@ -412,7 +412,7 @@ class SliceCanvas(wxgl.GLCanvas): ...@@ -412,7 +412,7 @@ class SliceCanvas(wxgl.GLCanvas):
""" """
if xpos > self.xmax: xpos = self.xmax if xpos > self.xmax: xpos = self.xmax
elif xpos < self.xmin: xpos = self.xmin elif xpos < self.xmin: xpos = self.xmin
self._xpos = xpos self._xpos = xpos
...@@ -431,7 +431,7 @@ class SliceCanvas(wxgl.GLCanvas): ...@@ -431,7 +431,7 @@ class SliceCanvas(wxgl.GLCanvas):
""" """
if ypos > self.ymax: ypos = self.ymax if ypos > self.ymax: ypos = self.ymax
elif ypos < self.ymin: ypos = self.ymin elif ypos < self.ymin: ypos = self.ymin
self._ypos = ypos self._ypos = ypos
...@@ -488,9 +488,9 @@ class SliceCanvas(wxgl.GLCanvas): ...@@ -488,9 +488,9 @@ class SliceCanvas(wxgl.GLCanvas):
self.ymax = imageList.maxBounds[self.yax] self.ymax = imageList.maxBounds[self.yax]
self.zmax = imageList.maxBounds[self.zax] self.zmax = imageList.maxBounds[self.zax]
self._xpos = (self.xmax - self.xmin) / 2.0 self._xpos = self.xmin + abs(self.xmax - self.xmin) / 2.0
self._ypos = (self.ymax - self.ymin) / 2.0 self._ypos = self.ymin + abs(self.ymax - self.ymin) / 2.0
self._zpos = (self.zmax - self.zmin) / 2.0 self._zpos = self.zmin + abs(self.zmax - self.zmin) / 2.0
# This flag is set by the _initGLData method # This flag is set by the _initGLData method
# when it has finished initialising the OpenGL # when it has finished initialising the OpenGL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment