trackeditor: fix split segment for height start and height end

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9254 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
iobyte 2024-01-18 02:32:51 +00:00
parent 9bf7484972
commit 257101ce00
2 changed files with 9 additions and 1 deletions

View File

@ -652,6 +652,14 @@ public class CircuitView extends JComponent implements KeyListener, MouseListene
newShape.getLeft().setBarrierWidth(oldShape.getLeft().getBarrierWidth());
newShape.getRight().setBarrierWidth(oldShape.getRight().getBarrierWidth());
if (!Double.isNaN(oldShape.getHeightStart()) && !Double.isNaN(oldShape.getHeightEnd()))
{
newShape.setHeightEnd(oldShape.getHeightEnd());
double leftHeight = oldShape.getHeightStart() + (oldShape.getHeightEnd() - oldShape.getHeightStart()) * splitPoint;
newShape.setHeightStart(leftHeight);
oldShape.setHeightEnd(leftHeight);
}
if (!Double.isNaN(oldShape.getHeightStartLeft()) && !Double.isNaN(oldShape.getHeightEndLeft()))
{
newShape.setHeightEndLeft(oldShape.getHeightEndLeft());

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.1";
public final String version = "1.4.2";
private String path;
private double imageScale = 1;