From 3911464e6847da81322099e5dc5895300daa46c3 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Sun, 17 Jan 2016 19:14:02 +0000 Subject: [PATCH] Fixed lightbox canvas grid drawing. --- fsl/fsleyes/gl/lightboxcanvas.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fsl/fsleyes/gl/lightboxcanvas.py b/fsl/fsleyes/gl/lightboxcanvas.py index 353da3612..5879c5854 100644 --- a/fsl/fsleyes/gl/lightboxcanvas.py +++ b/fsl/fsleyes/gl/lightboxcanvas.py @@ -600,11 +600,11 @@ class LightBoxCanvas(slicecanvas.SliceCanvas): xmin = self.displayCtx.bounds.getLo( self.xax) ymin = self.displayCtx.bounds.getLo( self.yax) - rowLines = np.zeros(((self.nrows - 1) * 2, 2), dtype=np.float32) - colLines = np.zeros(((self.ncols - 1) * 2, 2), dtype=np.float32) + rowLines = np.zeros(((self._totalRows - 1) * 2, 2), dtype=np.float32) + colLines = np.zeros(((self.ncols - 1) * 2, 2), dtype=np.float32) topRow = self._totalRows - self.topRow - btmRow = topRow - self.nrows + btmRow = topRow - self._totalRows rowLines[:, 1] = np.arange( ymin + (btmRow + 1) * ylen, @@ -612,12 +612,12 @@ class LightBoxCanvas(slicecanvas.SliceCanvas): rowLines[:, 0] = np.tile( np.array([xmin, xmin + self.ncols * xlen]), - self.nrows - 1) + self._totalRows - 1) colLines[:, 0] = np.arange( xmin + xlen, - xmin + xlen * self.ncols, xlen).repeat(2) - + xmin + xlen * self.ncols, xlen).repeat(2) + colLines[:, 1] = np.tile(np.array([ ymin + btmRow * ylen, ymin + topRow * ylen]), self.ncols - 1) -- GitLab