Do not allow creation of empty names damage patterns, this fixes #366

This commit is contained in:
HomeWorld
2011-12-14 22:18:20 +02:00
parent 529ebd13c0
commit 76692bc451

View File

@@ -296,6 +296,10 @@ class DmgPatternEditorDlg (wx.Dialog):
self.stPercentages.SetLabel("Name already used, please pick another")
return
if newName == "":
self.stPercentages.SetLabel("Invalid name.")
return
cDP = service.DamagePattern.getInstance()
cDP.renamePattern(p, newName)