Skip to content

Commit ee27dac

Browse files
committed
fix
1 parent e35bd83 commit ee27dac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

gui/wxpython/gui_core/forms.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,9 @@ def __init__(self, parent, giface, task, id=wx.ID_ANY, frame=None, *args, **kwar
15101510
selection = gselect.Select(
15111511
parent=which_panel,
15121512
id=wx.ID_ANY,
1513-
validator=MapNameValidator(),
1513+
validator=MapNameValidator()
1514+
if p.get("age") == "new"
1515+
else wx.DefaultValidator,
15141516
size=globalvar.DIALOG_GSELECT_SIZE,
15151517
type=elem,
15161518
multiple=multiple,
@@ -1527,10 +1529,6 @@ def __init__(self, parent, giface, task, id=wx.ID_ANY, frame=None, *args, **kwar
15271529
# A gselect.Select is a combobox with two children: a textctl
15281530
# and a popupwindow; we target the textctl here
15291531
textWin = selection.GetTextCtrl()
1530-
'''# Attach MapValidator to gselect.Select
1531-
if p.get("age", "") == "new":
1532-
validator = MapValidator()
1533-
textWin.SetValidator(validator)'''
15341532
if globalvar.CheckWxVersion([3]):
15351533
p["wxId"] = [
15361534
selection.GetId(),

0 commit comments

Comments
 (0)