Skip to content

Commit 32a9ea2

Browse files
darktohkardb
authored andcommitted
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 panda3d#880
1 parent 9966dda commit 32a9ea2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

direct/src/gui/DirectScrolledList.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def scrollTo(self, index, centered=0):
210210
numItemsVisible = self["numItemsVisible"]
211211
numItemsTotal = len(self["items"])
212212
if(centered):
213-
self.index = index - (numItemsVisible/2)
213+
self.index = index - (numItemsVisible // 2)
214214
else:
215215
self.index = index
216216

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy