Show short profile name in graphs

This commit is contained in:
DarkPhoenix
2019-12-07 02:43:53 +03:00
parent e07c4f65ab
commit d8cd3197b5
9 changed files with 29 additions and 30 deletions

View File

@@ -48,7 +48,7 @@ class DmgPatternNameValidator(BaseValidator):
try:
if len(text) == 0:
raise ValueError("You must supply a name for your Damage Profile!")
elif text in [x.name for x in entityEditor.choices]:
elif text in [x.rawName for x in entityEditor.choices]:
raise ValueError("Damage Profile name already in use, please choose another.")
return True
@@ -66,8 +66,8 @@ class DmgPatternEntityEditor(EntityEditor):
def getEntitiesFromContext(self):
sDP = DamagePattern.getInstance()
choices = sorted(sDP.getUserDamagePatternList(), key=lambda p: p.name)
return [c for c in choices if c.name != "Selected Ammo"]
choices = sorted(sDP.getUserDamagePatternList(), key=lambda p: p.rawName)
return [c for c in choices if c.rawName != "Selected Ammo"]
def DoNew(self, name):
sDP = DamagePattern.getInstance()
@@ -237,7 +237,7 @@ class DmgPatternEditor(AuxiliaryFrame):
if p is None:
return
if p.name == "Uniform" or p.name == "Selected Ammo":
if p.rawName == "Uniform" or p.rawName == "Selected Ammo":
self.restrict()
else:
self.unrestrict()