[chronojump] DistancesStringAsMeters manages correctly RSA



commit abd6db6eea64ee78e995c39baabde288766d2897
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Aug 31 17:37:19 2022 +0200

    DistancesStringAsMeters manages correctly RSA

 src/runType.cs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/runType.cs b/src/runType.cs
index 4e3948d5d..77b52e368 100644
--- a/src/runType.cs
+++ b/src/runType.cs
@@ -588,10 +588,14 @@ public class RunType : EventType
                set { distancesString = value; }
        }
 
+       // converts "5-R24" into "5m" for displaying
        // converts "5-5-10" into "5m 5m 10m" for displaying
        public static string DistancesStringAsMeters (string distancesString)
        {
-               return Util.ChangeChars (distancesString, "-", "m ") + "m";
+               if (distancesString.Contains ("R")) //RSA
+                       return Util.RemoveFromChar (distancesString, '-') + "m";
+               else
+                       return Util.ChangeChars (distancesString, "-", "m ") + "m";
        }
 
        public bool IsRSA {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]