diff --git a/fsl/fslview/controls/locationpanel.py b/fsl/fslview/controls/locationpanel.py index 0c646f0f4d44793a52f7903e91ad23bafd2f58ae..1d85ed78322373e18de6448c27f2e59c6c3ebeb6 100644 --- a/fsl/fslview/controls/locationpanel.py +++ b/fsl/fslview/controls/locationpanel.py @@ -225,10 +225,13 @@ class LocationPanel(wx.Panel, props.HasProperties): self._voxelPanel.Layout() oldLoc = self.imageList.location.xyz + voxLoc = image.worldToVox([oldLoc])[0] for i in range(3): self.voxelLocation.setLimits(i, 0, image.shape[i] - 1) + self.voxelLocation.xyz = voxLoc + # The voxel coordinates may have inadvertently been # changed due to a change in their limits. So we'll # restore the old location from the real world