[chronojump] On inertial ec capture, show ce on treeview capture



commit 410d3e4014147f81adcfa126bedbba355f3b3503
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Mar 17 12:38:46 2015 +0100

    On inertial ec capture, show ce on treeview capture

 src/gui/encoderTreeviews.cs |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index ace9697..d9d2068 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -796,15 +796,22 @@ public partial class ChronoJumpWindow
                if(ecconLast == "c")
                        (cell as Gtk.CellRendererText).Text = 
                                String.Format(UtilGtk.TVNumPrint(curve.N,1,0),Convert.ToInt32(curve.N));
-               else if (ecconLast=="ec" || ecconLast =="ecS") {
-                       string phase = "e";
+               else if (ecconLast=="ec" || ecconLast =="ecS") 
+               {
                        bool isEven = Util.IsEven(Convert.ToInt32(curve.N));
+                       
+                       //if we are capturing and has inertia, it comes as 'c','e'
+                       if(capturingCsharp == encoderCaptureProcess.CAPTURING && 
encoderConfigurationCurrent.has_inertia)
+                               isEven = !isEven;
+
+                       string phase = "e";
                        if(isEven)
                                phase = "c";
                                
                        (cell as Gtk.CellRendererText).Text = 
                                decimal.Truncate((Convert.ToInt32(curve.N) +1) /2).ToString() + phase;
-               } else {        //(ecconLast=="ce" || ecconLast =="ceS") {
+               } else 
+               {       //(ecconLast=="ce" || ecconLast =="ceS") {
                        string phase = "c";
                        bool isEven = Util.IsEven(Convert.ToInt32(curve.N));
                        if(isEven)


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