Fix Python3 division in ThumbnailCtrl

This commit is contained in:
Robin Dunn
2018-02-13 18:43:08 -08:00
parent d8f27a8f01
commit 643c57709a
2 changed files with 4 additions and 3 deletions

View File

@@ -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)

View File

@@ -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()