[chronojump] forceSensorAnalyzeInstant zoom missing start of rep when end goes out of zoom
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] forceSensorAnalyzeInstant zoom missing start of rep when end goes out of zoom
- Date: Mon, 5 Oct 2020 15:27:39 +0000 (UTC)
commit ccac8d98b34858faa299224870ccedf8290cf8e5
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Oct 5 17:27:09 2020 +0200
forceSensorAnalyzeInstant zoom missing start of rep when end goes out of zoom
src/gui/app1/forceSensorAnalyze.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index ba1f6359..8946faf8 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -1234,7 +1234,7 @@ public partial class ChronoJumpWindow
// paint vertical line for each rep
if(sampleStart >= 0) {
xposRepStart = fsAI.GetXFromSampleCount(sampleStart);
- //no need to graph two green lines together ir rep starts just on previous
rep ends
+ //no need to graph two green lines together if rep starts just on previous
rep ends
if(xposRepStart > xposRepEnd)
force_sensor_ai_pixmap.DrawLine(pen_green_force_ai,
xposRepStart, textHeight +6, xposRepStart,
allocation.Height - textHeight -6);
@@ -1264,11 +1264,18 @@ public partial class ChronoJumpWindow
}
}
}
- //show the number of last repetition (when obviously no new rep will make writting it)
+ //show the start vertical line and the number of last repetition (when obviously no new rep
will make writting it)
//but only if zoomed and that repetition exists (has an end)
- if(xposRepEnd - xposRepStart > 30)
- if(forceSensorZoomApplied && j >= 0 && j < reps_l.Count) // write last repetition
count
+ if(forceSensorZoomApplied && j >= 0 && j < reps_l.Count)
+ {
+ //write the vertical start line
+ force_sensor_ai_pixmap.DrawLine(pen_green_force_ai,
+ xposRepStart, textHeight +6, xposRepStart, allocation.Height -
textHeight -6);
+
+ //write last repetition count
+ if(xposRepEnd - xposRepStart > 30)
forceSensorWriteRepetitionCode (j, reps_l[j].TypeShort(), xposRepStart,
xposRepEnd, true, false);
+ }
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]