FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix for bug in window location. Was using last window location from j… · PySimpleGUI/PySimpleGUI@b15fc95 · GitHub

Commit b15fc95

Browse files
committed
Fix for bug in window location. Was using last window location from json file when auto_save_location=True creating Window rather than using the location set in the Window creation.
1 parent e97618b commit b15fc95

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

‎PySimpleGUI/PySimpleGUI.py‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
"""
5656

57-
version = "6.3.11"
57+
version = "6.3.12"
5858

5959

6060

@@ -87,6 +87,8 @@
8787
every window is created. Rather than using Alpha to hide a window while it's being created, this version withdraws the window and uses a call I didn't
8888
know about to get the size of the window before it's fully created. master.winfo_reqwidth() master.winfo_reqheight(). Alpha was needed before so
8989
the window dimensions could be gathered to determine where to locate the window so it is centered on the screen.
90+
6.3.12 26-Aug-2026 Fix for bug in window location. Was using last window location from json file when auto_save_location=True creating Window rather than using the
91+
location set in the Window creation.
9092
"""
9193

9294

@@ -10401,9 +10403,13 @@ def __init__(self, title, layout=None, default_element_size=None,
1040110403
self.Title = str(title)
1040210404
self.Rows = [] # a list of ELEMENTS for this row
1040310405
self.DefaultElementSize = default_element_size if default_element_size is not None else DEFAULT_ELEMENT_SIZE
10404-
self.DefaultButtonElementSize = default_button_element_size if default_button_element_size != (
10405-
None, None) else DEFAULT_BUTTON_ELEMENT_SIZE
10406-
if DEFAULT_WINDOW_LOCATION != (None, None) and location == (None, None):
10406+
self.DefaultButtonElementSize = default_button_element_size if default_button_element_size != (None, None) else DEFAULT_BUTTON_ELEMENT_SIZE
10407+
10408+
self._last_location = (None, None) # used by a property
10409+
self.auto_save_location = auto_save_location
10410+
if auto_save_location is True and location == (None, None):
10411+
self.Location = tuple(user_settings_get_entry('-LAST WINDOW LOCATION-'+title, self.Location))
10412+
elif DEFAULT_WINDOW_LOCATION != (None, None) and location == (None, None):
1040710413
self.Location = DEFAULT_WINDOW_LOCATION
1040810414
else:
1040910415
self.Location = location
@@ -10530,10 +10536,7 @@ def __init__(self, title, layout=None, default_element_size=None,
1053010536
self._has_custom_titlebar = use_custom_titlebar
1053110537
self._mousex = self._mousey = 0
1053210538
self._startx = self._starty = 0
10533-
self._last_location = (None, None) # used by a property
10534-
self.auto_save_location = auto_save_location
10535-
if auto_save_location is True:
10536-
self.Location = tuple(user_settings_get_entry('-LAST WINDOW LOCATION-'+title, self.Location))
10539+
1053710540
self.scaling = scaling if scaling is not None else DEFAULT_SCALING
1053810541

1053910542
if self.use_custom_titlebar:

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def readme():
1111

1212
setuptools.setup(
1313
name="pysimplegui",
14-
version="6.3.11",
14+
version="6.3.12",
1515
author="PySimpleGUI",
1616
author_email="PySimpleGUI@PySimpleGUI.org",
1717
description="Python GUIs for Humans. Launched in 2018. NEW LGPL3 Version 6 released in 2026.",

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL