mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
dgui: Fix DirectScrolledList scrollTo error in Python 3
As a rule of thumb, Python 3 divisions always have float results. Unfortunately, this piece of code is still relying on the old Python 2.7 behavior. Closes #880
This commit is contained in:
parent
9966ddaa33
commit
32a9ea2cef
@ -210,7 +210,7 @@ class DirectScrolledList(DirectFrame):
|
||||
numItemsVisible = self["numItemsVisible"]
|
||||
numItemsTotal = len(self["items"])
|
||||
if(centered):
|
||||
self.index = index - (numItemsVisible/2)
|
||||
self.index = index - (numItemsVisible // 2)
|
||||
else:
|
||||
self.index = index
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user