[chronojump] Fixed bad smoothing was assigned to some paint curves



commit ba53f17443c60a98cb2d4c9b4ce57dc27d3ca786
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu May 14 19:21:50 2015 +0200

    Fixed bad smoothing was assigned to some paint curves

 encoder/graph.R |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 9fa284e..34401ba 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -2386,9 +2386,13 @@ doProcess <- function(options)
                        #       myEccon="c"
                        #}
 
+                       #find which SmoothingsEC is needed
+                       smoothingPos <- 1
+                       if(op$Jump %in% rownames(curves))
+                               smoothingPos <- which(rownames(curves) == op$Jump)
 
                        paint(displacement, myEccon, myStart, myEnd,"undefined","undefined",FALSE,FALSE,
-                             1,curves[op$Jump,3],SmoothingsEC[1],op$SmoothingOneC,myMassBody,myMassExtra,
+                             
1,curves[op$Jump,3],SmoothingsEC[smoothingPos],op$SmoothingOneC,myMassBody,myMassExtra,
                              
myEncoderConfigurationName,myDiameter,myDiameterExt,myAnglePush,myAngleWeight,myInertiaMomentum,myGearedDown,
                              paste(op$Title, " ", op$Analysis, " ", myEccon, ". ", myCurveStr, sep=""),
                              "", #subtitle


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