[chronojump/michrolab] GetLimitedRounded shows jumps, tracks or seconds instead of J, R, T (jumpsRj, runsI treeview, edit eve
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/michrolab] GetLimitedRounded shows jumps, tracks or seconds instead of J, R, T (jumpsRj, runsI treeview, edit eve
- Date: Thu, 6 Oct 2022 10:53:01 +0000 (UTC)
commit e3ce02b58acd1aac17d8228c2cfffd6863b5e5e7
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Aug 30 13:02:52 2022 +0200
GetLimitedRounded shows jumps, tracks or seconds instead of J,R,T (jumpsRj, runsI treeview, edit event,
exportSession)
src/util.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/util.cs b/src/util.cs
index e585a6171..1830bf1e4 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1884,17 +1884,25 @@ public class Util
//do this for showing the Limited with selected decimals and without loosing the end letter: 'J' or
'T'
- //called by treeview_jump, treeview_run and gui/jump_edit and gui/run_edit?
- public static string GetLimitedRounded(string limitedString, int pDN)
+ //called by treeview_jump, treeview_run and gui/jump_edit and gui/run_edit
+ public static string GetLimitedRounded (string limitedString, int pDN)
{
LogB.Information("GetLimitedRounded limitedString pdN");
LogB.Information(limitedString);
LogB.Information(pDN.ToString());
string myLimitedWithoutLetter = limitedString.Substring(0, limitedString.Length -1);
+
string myLimitedLetter = limitedString.Substring(limitedString.Length -1, 1);
- return TrimDecimals(myLimitedWithoutLetter, pDN) + myLimitedLetter;
+ //without the letter, use jumps, tracks or seconds
+ string myLimiter = " " + Constants.jumpsTranslatedStr (); //("J")
+ if (myLimitedLetter == "R")
+ myLimiter = " " + Constants.tracksTranslatedStr ();
+ if (myLimitedLetter == "T")
+ myLimiter = " s";
+
+ return TrimDecimals(myLimitedWithoutLetter, pDN) + myLimiter;
}
public static string [] AddToArrayString (string [] initialString, List<string> add_l)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]