Skip to content

Commit

Permalink
wxGUI/modules: fix entering raster map file path by the keyboard (#2702)
Browse files Browse the repository at this point in the history
Inside Import Gdal dialog `FileBrowseButton` widget text field.
  • Loading branch information
tmszi committed Dec 22, 2022
1 parent 732ae9f commit 8746d96
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gui/wxpython/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,12 @@ def GetValidLayerName(name):
cIdx += 1
retName = ''.join(retNameList)

if not (retName[0] >= 'A' and retName[0] <= 'Z') and \
not (retName[0] >= 'a' and retName[0] <= 'z'):
retName = 'x' + retName[1:]
if (
retName
and not (retName[0] >= "A" and retName[0] <= "Z")
and not (retName[0] >= "a" and retName[0] <= "z")
):
retName = "x" + retName[1:]

if mapset:
retName = retName + '@' + mapset
Expand Down

0 comments on commit 8746d96

Please sign in to comment.