trackeditor: fix profil tangents when splitting a segment
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9303 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
parent
67a51d9b58
commit
02620f9ddf
|
@ -652,7 +652,7 @@ public class EditorFrame extends JFrame
|
|||
|
||||
setTitle(originalTitle + " - Project: " + projectFileName);
|
||||
|
||||
writeTrack();
|
||||
//writeTrack();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -628,6 +628,9 @@ public class CircuitView extends JComponent implements KeyListener, MouseListene
|
|||
{
|
||||
double leftSide2 = oldShape.getLeft().getSideStartWidth() + (oldShape.getLeft().getSideEndWidth() - oldShape.getLeft().getSideStartWidth()) * splitPoint;
|
||||
double rightSide2 = oldShape.getRight().getSideStartWidth() + (oldShape.getRight().getSideEndWidth() - oldShape.getRight().getSideStartWidth()) * splitPoint;
|
||||
double gradeAtSplitPoint = oldShape.getGradeAt(editorFrame, splitPoint);
|
||||
double gradeAtSplitPointLeft = oldShape.getGradeAtLeft(editorFrame, splitPoint);
|
||||
double gradeAtSplitPointRight = oldShape.getGradeAtRight(editorFrame, splitPoint);
|
||||
|
||||
newShape.getLeft().setBorderWidth(oldShape.getLeft().getBorderWidth());
|
||||
newShape.getRight().setBorderWidth(oldShape.getRight().getBorderWidth());
|
||||
|
@ -697,8 +700,22 @@ public class CircuitView extends JComponent implements KeyListener, MouseListene
|
|||
if (oldShape.hasProfilStartTangent() || oldShape.hasProfilEndTangent())
|
||||
{
|
||||
newShape.setProfilEndTangent(oldShape.getProfilEndTangent());
|
||||
newShape.setProfilStartTangent(oldShape.getCalculatedGrade());
|
||||
oldShape.setProfilEndTangent(oldShape.getCalculatedGrade());
|
||||
newShape.setProfilStartTangent(gradeAtSplitPoint);
|
||||
oldShape.setProfilEndTangent(gradeAtSplitPoint);
|
||||
}
|
||||
|
||||
if (oldShape.hasProfilStartTangentLeft() || oldShape.hasProfilEndTangentLeft())
|
||||
{
|
||||
newShape.setProfilEndTangentLeft(oldShape.getProfilEndTangentLeft());
|
||||
newShape.setProfilStartTangentLeft(gradeAtSplitPointLeft);
|
||||
oldShape.setProfilEndTangentLeft(gradeAtSplitPointLeft);
|
||||
}
|
||||
|
||||
if (oldShape.hasProfilStartTangentRight() || oldShape.hasProfilEndTangentRight())
|
||||
{
|
||||
newShape.setProfilEndTangentRight(oldShape.getProfilEndTangentRight());
|
||||
newShape.setProfilStartTangentRight(gradeAtSplitPointRight);
|
||||
oldShape.setProfilEndTangentRight(gradeAtSplitPointRight);
|
||||
}
|
||||
|
||||
newShape.setGrade(oldShape.getGrade());
|
||||
|
|
|
@ -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.30";
|
||||
public final String version = "1.4.31";
|
||||
private String path;
|
||||
|
||||
private double imageScale = 1;
|
||||
|
|
Loading…
Reference in New Issue