From 064805dcfeb1a6770010268e8857aee762b83ccc Mon Sep 17 00:00:00 2001 From: Steve Barnes Date: Thu, 2 Jun 2016 06:53:08 +0100 Subject: [PATCH] Used interger devision in ColourDB due to python 3 change --- demo/ColourDB.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/ColourDB.py b/demo/ColourDB.py index 15ff1875..14331bf2 100644 --- a/demo/ColourDB.py +++ b/demo/ColourDB.py @@ -110,12 +110,12 @@ class TestWindow(wx.ScrolledWindow): rect = rgn.GetBox() pixStart = vs[1]*self.lineHeight + rect.y pixStop = pixStart + rect.height - start = pixStart / self.lineHeight - 1 - stop = pixStop / self.lineHeight + start = pixStart // self.lineHeight - 1 + stop = pixStop // self.lineHeight else: start = 0 stop = numColours - + for line in range(max(0,start), min(stop,numColours)): clr = colours[line][0] y = (line+1) * self.lineHeight + 2