mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
dgui: fix DirectSlider regression on Python 2
This commit is contained in:
parent
cae7d55c8d
commit
a50d375c35
@ -10,7 +10,7 @@ from panda3d.core import *
|
|||||||
from . import DirectGuiGlobals as DGG
|
from . import DirectGuiGlobals as DGG
|
||||||
from .DirectFrame import *
|
from .DirectFrame import *
|
||||||
from .DirectButton import *
|
from .DirectButton import *
|
||||||
from math import isfinite
|
from math import isnan
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import DirectSlider
|
import DirectSlider
|
||||||
@ -91,14 +91,14 @@ class DirectSlider(DirectFrame):
|
|||||||
# This is the internal function that is called when
|
# This is the internal function that is called when
|
||||||
# self['value'] is directly assigned.
|
# self['value'] is directly assigned.
|
||||||
value = self['value']
|
value = self['value']
|
||||||
assert isfinite(value)
|
assert not isnan(value)
|
||||||
self.guiItem.setValue(value)
|
self.guiItem.setValue(value)
|
||||||
|
|
||||||
def setValue(self, value):
|
def setValue(self, value):
|
||||||
# This is the public function that is meant to be called by a
|
# This is the public function that is meant to be called by a
|
||||||
# user that doesn't like to use (or doesn't understand) the
|
# user that doesn't like to use (or doesn't understand) the
|
||||||
# preferred interface of self['value'].
|
# preferred interface of self['value'].
|
||||||
assert isfinite(value)
|
assert not isnan(value)
|
||||||
self['value'] = value
|
self['value'] = value
|
||||||
|
|
||||||
def getValue(self):
|
def getValue(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user