trackeditor: simplify getReliefs access

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8888 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 39f692a7b8d07a9d05f13c3f6f827e94328cc6a8
Former-commit-id: e773329b5de61fd38f2ac5fb38c01ba95352f257
This commit is contained in:
iobyte 2023-04-20 20:05:54 +00:00
parent 0d36ada7ca
commit d3368ab91d
3 changed files with 6 additions and 6 deletions

View file

@ -1551,7 +1551,7 @@ public class CircuitView extends JComponent implements KeyListener, MouseListene
if (showReliefs)
{
g.setColor(Color.blue);
Reliefs reliefs = editorFrame.getTrackData().getGraphic().getTerrainGeneration().getReliefs();
Reliefs reliefs = editorFrame.getReliefs();
for (int j = 0; j < reliefs.getReliefs().size(); j++)
{
ObjShapeRelief relief = reliefs.getReliefs().get(j);
@ -1835,9 +1835,9 @@ public class CircuitView extends JComponent implements KeyListener, MouseListene
public void setShowReliefs(boolean showReliefs)
{
this.showReliefs = showReliefs;
if (showReliefs && editorFrame.getTrackData().getGraphic().getTerrainGeneration().getReliefs().getReliefs().size() > 0)
if (showReliefs && editorFrame.getReliefs().getReliefs().size() > 0)
{
setReliefs(editorFrame.getTrackData().getGraphic().getTerrainGeneration().getReliefs());
setReliefs(editorFrame.getReliefs());
}
}
@ -1929,7 +1929,7 @@ public class CircuitView extends JComponent implements KeyListener, MouseListene
if (showReliefs)
{
setReliefs(editorFrame.getTrackData().getGraphic().getTerrainGeneration().getReliefs());
setReliefs(editorFrame.getReliefs());
}
// zoom

View file

@ -876,7 +876,7 @@ public class XmlWriter
addContent(element, "elevation map", editorFrame.getTrackData().getGraphic().getTerrainGeneration().getElevationMap());
addContent(element, "relief file", editorFrame.getTrackData().getGraphic().getTerrainGeneration().getReliefFile());
if (editorFrame.getTrackData().getGraphic().getTerrainGeneration().getReliefs().getChanged())
if (editorFrame.getReliefs().getChanged())
{
try
{

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