[chronojump/FS-TFT-Menu] Fixed bars order on Run simple since recent commits



commit eb8e48fcd92388787751df727beebe5c5ca521fe
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 20 11:00:33 2022 +0200

    Fixed bars order on Run simple since recent commits

 src/gui/usefulObjects.cs | 2 +-
 src/sqlite/run.cs        | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/usefulObjects.cs b/src/gui/usefulObjects.cs
index 9e90752e8..ebb376aa7 100644
--- a/src/gui/usefulObjects.cs
+++ b/src/gui/usefulObjects.cs
@@ -263,7 +263,7 @@ public class PrepareEventGraphRunSimple {
 
                //obtain data
                runsAtSQL = SqliteRun.SelectRuns (true, sessionID, personIDTemp, type,
-                               Sqlite.Orders_by.ID_DESC, limit,
+                               Sqlite.Orders_by.ID_ASC, limit,
                                allPersons, false); //show names on comments only if "all persons"
 
                
diff --git a/src/sqlite/run.cs b/src/sqlite/run.cs
index 0b0461f2b..524d89911 100644
--- a/src/sqlite/run.cs
+++ b/src/sqlite/run.cs
@@ -110,7 +110,9 @@ class SqliteRun : Sqlite
                        filterTypeString = " AND " + t + ".type = \"" + filterType + "\" " ;
 
                string orderByString = string.Format(" ORDER BY upper({0}.name), {1}.uniqueID ", tp, t);
-               if(order == Orders_by.ID_DESC)
+               if(order == Orders_by.ID_ASC)
+                       orderByString = string.Format(" ORDER BY {0}.uniqueID ", t);
+               else if(order == Orders_by.ID_DESC)
                        orderByString = string.Format(" ORDER BY {0}.uniqueID DESC ", t);
                if(onlyBestInSession)
                        orderByString = string.Format(" ORDER BY {0}.sessionID, {0}.distance/{0}.time DESC ", 
t);


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