trackeditor: fix segment clone and set for calculated values

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9319 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
iobyte 2024-02-13 02:20:42 +00:00
parent 6dc546b74d
commit f50ae917c5
2 changed files with 31 additions and 1 deletions

View File

@ -34,7 +34,7 @@ public class Properties
private static Properties instance = new Properties();
private Vector<ActionListener> propertiesListeners = new Vector<ActionListener>();
public final String title = "sd2-trackeditor";
public final String version = "1.4.40";
public final String version = "1.4.41";
private String path;
private double imageScale = 1;

View File

@ -202,6 +202,21 @@ public class Segment implements Cloneable
profilEndTangentLeft = segment.profilEndTangentLeft;
profilStartTangentRight = segment.profilStartTangentRight;
profilEndTangentRight = segment.profilEndTangentRight;
calculatedHeightStart = segment.calculatedHeightStart;
calculatedHeightStartLeft = segment.calculatedHeightStartLeft;
calculatedHeightStartRight = segment.calculatedHeightStartRight;
calculatedHeightEnd = segment.calculatedHeightEnd;
calculatedHeightEndLeft = segment.calculatedHeightEndLeft;
calculatedHeightEndRight = segment.calculatedHeightEndRight;
calculatedGrade = segment.calculatedGrade;
calculatedBankingStart = segment.calculatedBankingStart;
calculatedBankingEnd = segment.calculatedBankingEnd;
calculatedStartTangent = segment.calculatedStartTangent;
calculatedEndTangent = segment.calculatedEndTangent;
calculatedStartTangentLeft = segment.calculatedStartTangentLeft;
calculatedEndTangentLeft = segment.calculatedEndTangentLeft;
calculatedStartTangentRight = segment.calculatedStartTangentRight;
calculatedEndTangentRight = segment.calculatedEndTangentRight;
points = Arrays.copyOf(segment.points, segment.points.length);
trPoints = Arrays.copyOf(segment.trPoints, segment.trPoints.length);
xToDraw = Arrays.copyOf(segment.xToDraw, segment.xToDraw.length);
@ -928,6 +943,21 @@ public class Segment implements Cloneable
s.profilEndTangentLeft = this.profilEndTangentLeft;
s.profilStartTangentRight = this.profilStartTangentRight;
s.profilEndTangentRight = this.profilEndTangentRight;
s.calculatedHeightStart = this.calculatedHeightStart;
s.calculatedHeightStartLeft = this.calculatedHeightStartLeft;
s.calculatedHeightStartRight = this.calculatedHeightStartRight;
s.calculatedHeightEnd = this.calculatedHeightEnd;
s.calculatedHeightEndLeft = this.calculatedHeightEndLeft;
s.calculatedHeightEndRight = this.calculatedHeightEndRight;
s.calculatedGrade = this.calculatedGrade;
s.calculatedBankingStart = this.calculatedBankingStart;
s.calculatedBankingEnd = this.calculatedBankingEnd;
s.calculatedStartTangent = this.calculatedStartTangent;
s.calculatedEndTangent = this.calculatedEndTangent;
s.calculatedStartTangentLeft = this.calculatedStartTangentLeft;
s.calculatedEndTangentLeft = this.calculatedEndTangentLeft;
s.calculatedStartTangentRight = this.calculatedStartTangentRight;
s.calculatedEndTangentRight = this.calculatedEndTangentRight;
s.points = Arrays.copyOf(points, points.length);
s.trPoints = Arrays.copyOf(trPoints, trPoints.length);
s.xToDraw = xToDraw.clone();