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 7f0142a commit 4813367
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gui/wxpython/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ 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"
if (
retName
and not (retName[0] >= "A" and retName[0] <= "Z")
and not (retName[0] >= "a" and retName[0] <= "z")
):
retName = "x" + retName[1:]

Expand Down

0 comments on commit 4813367

Please sign in to comment.