Fix issue with entity editor and wxPython 2.8
This commit is contained in:
@@ -36,14 +36,14 @@ class DmgPatternTextValidor(BaseValidator):
|
||||
return DmgPatternTextValidor()
|
||||
|
||||
def Validate(self, win):
|
||||
profileEditor = win.Parent
|
||||
entityEditor = win.parent
|
||||
textCtrl = self.GetWindow()
|
||||
text = textCtrl.GetValue().strip()
|
||||
|
||||
try:
|
||||
if len(text) == 0:
|
||||
raise ValueError("You must supply a name for your Damage Profile!")
|
||||
elif text in [x.name for x in profileEditor.entityEditor.choices]:
|
||||
elif text in [x.name for x in entityEditor.choices]:
|
||||
raise ValueError("Damage Profile name already in use, please choose another.")
|
||||
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user