Skip to content

Commit

Permalink
wxGUI: do not crash on localized GUIs (OSGeo#2488)
Browse files Browse the repository at this point in the history
PR OSGeo#2469 (908c5e2) introduced
a code that uses English UI strings to identify UI elements.
In the case of a translated UI it fails to get element and then
proceeds to manipulate with not existing element leading to
an assert in C++ wx code.
  • Loading branch information
marisn authored and ninsbl committed Feb 17, 2023
1 parent a6010ad commit c8383b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/wxpython/lmgr/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,10 +505,10 @@ def CreateRecentFilesMenu(self, menu=None):
"""
if menu:
file_menu = menu.GetMenu(
menuIndex=menu.FindMenu(title="File"),
menuIndex=menu.FindMenu(title=_("File")),
)
workspace_item = file_menu.FindItem(
id=file_menu.FindItem(itemString="Workspace"),
id=file_menu.FindItem(itemString=_("Workspace")),
)[0]
self._recent_files = RecentFilesMenu(
app_name="main",
Expand Down

0 comments on commit c8383b5

Please sign in to comment.