Fix displaying HeroVersionType in version delegate

This commit is contained in:
Roy Nieterau 2024-03-25 15:37:22 +01:00
parent 11f5d9d571
commit 44641bc630

View file

@ -123,6 +123,7 @@ def paint_image_with_color(image, color):
def format_version(value):
"""Formats integer to displayable version name"""
value = int(value) # convert e.g. HeroVersionType to its version value
label = "v{0:03d}".format(abs(value))
if value < 0:
return "[{}]".format(label)