[chronojump] DistancesStringAsMeters manages correctly RSA
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DistancesStringAsMeters manages correctly RSA
- Date: Wed, 31 Aug 2022 15:44:09 +0000 (UTC)
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]