Fix issue with entity editor and wxPython 2.8

This commit is contained in:
blitzmann
2016-06-28 23:24:01 -04:00
parent cdca8fe236
commit b9f0812b38
5 changed files with 12 additions and 11 deletions

View File

@@ -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