Skip to content

wxGUI/pyedit: Fix saving and opening a file in docked mode - #7643

Merged
lindakarlovska merged 1 commit into
OSGeo:mainfrom
lindakarlovska:wxGUI-fix-save-and-open-in-pyeditor
Jul 5, 2026
Merged

lindakarlovska merged 1 commit into
OSGeo:mainfrom
lindakarlovska:wxGUI-fix-save-and-open-in-pyeditor

Conversation

@lindakarlovska

Copy link
Copy Markdown
Contributor

Fixes saving and opening a py file in the default docked mode (undocked editor works fine):

The error when saving a file:

Traceback (most recent call last):
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/pyedit.py", line 816, in OnSave

self.controller.OnSave(*args, **kwargs)
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/pyedit.py", line 457, in OnSave

self.recent_files.AddFileToHistory(
AttributeError
:
'NoneType' object has no attribute 'AddFileToHistory'

The similar error shows up when opening a file:

Traceback (most recent call last):
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/pyedit.py", line 813, in OnOpen

self.controller.OnOpen(*args, **kwargs)
  File "/home/linduska/grass/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/pyedit.py", line 496, in OnOpen

self.recent_files.AddFileToHistory(
AttributeError
:
'NoneType' object has no attribute 'AddFileToHistory'

The upper menu is not present in the docked mode, so the recent_files variable is null.

@lindakarlovska lindakarlovska added bug Something isn't working GUI wxGUI related labels Jul 5, 2026
@github-actions github-actions Bot added the Python Related code is in Python label Jul 5, 2026
@lindakarlovska
lindakarlovska merged commit 4542f71 into OSGeo:main Jul 5, 2026
26 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Jul 5, 2026
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
Python editor: fix saving and opening a file in docked mode

Co-authored-by: lindakarlovska <l.kladivova@seznam.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working GUI wxGUI related Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants