trackeditor: fix surface texture search order

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

Former-commit-id: 0606191e3278aecc3480168cb933bc5efdec25d4
Former-commit-id: 54d6ddca117d00a57c3c4e61075dfe0ef965f0b8
This commit is contained in:
iobyte 2023-03-11 00:14:38 +00:00
parent c0726e221f
commit 22630d2cd4
2 changed files with 7 additions and 6 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.0.12";
public final String version = "1.0.13";
private String path;
private double imageScale = 1;

View file

@ -59,14 +59,15 @@ public class SurfaceComboBox extends JComboBox<String>
String tooltipText = null;
Vector<Surface> defaultSurfaces = editorFrame.getDefaultSurfaces();
Vector<Surface> surfaces = editorFrame.getTrackData().getSurfaces();
if (editorFrame.getDataDirectory() != null)
// look for texture in track directory first
tooltipText = getTextureName(surfaceName, surfaces, Editor.getProperties().getPath());
if (tooltipText == null && editorFrame.getDataDirectory() != null)
{
// look for texture in default textures directory if available
tooltipText = getTextureName(surfaceName, defaultSurfaces, editorFrame.getDataDirectory() + sep + "data" + sep + "textures");
}
if (tooltipText == null)
{
tooltipText = getTextureName(surfaceName, surfaces, Editor.getProperties().getPath());
}
setToolTipText(tooltipText);
}
}