diff --git a/CHANGES.rst b/CHANGES.rst index 975062d8..7eaa0973 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -25,6 +25,8 @@ Changes in this release include the following: * wx.Sizers can now be used as an iterator to iterate over the items within the sizer. (#738) +* Fix Python3 division in ThumbnailCtrl. (#746) + diff --git a/wx/lib/agw/thumbnailctrl.py b/wx/lib/agw/thumbnailctrl.py index 5e950f78..7d97cb05 100644 --- a/wx/lib/agw/thumbnailctrl.py +++ b/wx/lib/agw/thumbnailctrl.py @@ -1790,7 +1790,7 @@ class ScrolledThumbnail(wx.ScrolledWindow): :param `y`: the mouse `y` position. """ - col = (x - self._tBorder)/(self._tWidth + self._tBorder) + col = (x - self._tBorder)//(self._tWidth + self._tBorder) if col >= self._cols: col = self._cols - 1 @@ -1942,7 +1942,7 @@ class ScrolledThumbnail(wx.ScrolledWindow): return # get row - row = self.GetSelection()/self._cols + row = self.GetSelection()//self._cols # calc position to scroll view paintRect = self.GetPaintRect() @@ -2586,4 +2586,3 @@ class ScrolledThumbnail(wx.ScrolledWindow): self.Refresh() -