Merge pull request #5080 from PySimpleGUI/Dev-latest

Dev latest
This commit is contained in:
PySimpleGUI 2022-01-09 09:30:11 -05:00 committed by GitHub
commit 9cb517b2be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
version = __version__ = "4.56.0.2 Uneleased"
version = __version__ = "4.56.0.3 Uneleased"
_change_log = """
Changelog since 4.56.0 released to PyPI on 5-Jan-2022
@ -8,6 +8,8 @@ _change_log = """
set_options - added disable_modal_windows option to provide a single call to disable the modal feature globally (including popups)
4.56.0.2
Added OptionMenu to the list of tkinter widgets that are ignored when the grab anywhere feature is used
4.56.0.3
Slider - update the range FIRST and then the value in the update method (thank you Jason for the fix)
"""
__version__ = version.split()[0] # For PEP 396 and PEP 345
@ -7010,6 +7012,8 @@ class Slider(Element):
if not self._widget_was_created(): # if widget hasn't been created yet, then don't allow
return
if range != (None, None):
self.TKScale.config(from_=range[0], to_=range[1])
if value is not None:
try:
self.TKIntVar.set(value)
@ -7024,11 +7028,10 @@ class Slider(Element):
self.TKScale.pack_forget()
elif visible is True:
self.TKScale.pack(padx=self.pad_used[0], pady=self.pad_used[1])
if range != (None, None):
self.TKScale.config(from_=range[0], to_=range[1])
if visible is not None:
self._visible = visible
def _SliderChangedHandler(self, event):
"""
Not user callable. Callback function for when slider is moved.