From 6d1c50bbb5675bea7aa271d3923f21a6a532c4c7 Mon Sep 17 00:00:00 2001 From: andreasvapp Date: Sun, 2 Sep 2018 16:45:47 +0200 Subject: [PATCH] + fix name length --- Core/MapObjects/UserObject.cs | 2 +- Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/MapObjects/UserObject.cs b/Core/MapObjects/UserObject.cs index 44ff1b0..7680979 100644 --- a/Core/MapObjects/UserObject.cs +++ b/Core/MapObjects/UserObject.cs @@ -105,7 +105,7 @@ public override bool Render(Graphics g, int x, int y, int canvasW, int canvasH) relativeX = gameX + x; relativeY = gameY + y; - string name = Global.SettingsCollection["abbreviatenames"].ToBool() ? Name.Substring(0, 3) : Name; + string name = Name.Length > 3 && Global.SettingsCollection["abbreviatenames"].ToBool() ? Name.Substring(0, 3) : Name; SizeF sizeName = g.MeasureString(name, Font); int smartOffsetX = 0; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 0ef3c30..0587795 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // usando l'asterisco '*' come illustrato di seguito: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.2.1.8")] -[assembly: AssemblyFileVersion("0.2.1.8")] \ No newline at end of file +[assembly: AssemblyVersion("0.2.1.9")] +[assembly: AssemblyFileVersion("0.2.1.9")] \ No newline at end of file