Fixed Spline and MotionPath init issue when setting a curve tension before adding way points

This commit is contained in:
Nehon 2014-10-10 18:43:16 +02:00
parent 13b433e434
commit dd7ea3d2a7

View File

@ -316,7 +316,7 @@ public class Spline implements Savable {
*/ */
public void setCurveTension(float curveTension) { public void setCurveTension(float curveTension) {
this.curveTension = curveTension; this.curveTension = curveTension;
if(type==SplineType.CatmullRom) { if(type==SplineType.CatmullRom && !getControlPoints().isEmpty()) {
this.computeTotalLentgh(); this.computeTotalLentgh();
} }
} }