diff --git a/src/tools/trackeditor/gui/properties/CameraProperties.java b/src/tools/trackeditor/gui/properties/CameraProperties.java index b51dee8f2..e369b01d9 100644 --- a/src/tools/trackeditor/gui/properties/CameraProperties.java +++ b/src/tools/trackeditor/gui/properties/CameraProperties.java @@ -150,9 +150,14 @@ public class CameraProperties extends PropertyPanel public void run() { int lastTab = getEditorFrame().getProject().getPropertiesEditorCameraTab(); - + if (lastTab == -1 && tabbedPane.getTabCount() > 0) + { + lastTab = 0; + } if (lastTab < tabbedPane.getTabCount()) + { tabbedPane.setSelectedIndex(lastTab); + } } }); } diff --git a/src/tools/trackeditor/gui/properties/ObjectProperties.java b/src/tools/trackeditor/gui/properties/ObjectProperties.java index c719fca91..e18a25a33 100644 --- a/src/tools/trackeditor/gui/properties/ObjectProperties.java +++ b/src/tools/trackeditor/gui/properties/ObjectProperties.java @@ -247,9 +247,14 @@ public class ObjectProperties extends PropertyPanel public void run() { int lastTab = getEditorFrame().getProject().getPropertiesEditorObjectTab(); - + if (lastTab == -1 && tabbedPane.getTabCount() > 0) + { + lastTab = 0; + } if (lastTab < tabbedPane.getTabCount()) + { tabbedPane.setSelectedIndex(lastTab); + } } }); } diff --git a/src/tools/trackeditor/gui/properties/SurfaceProperties.java b/src/tools/trackeditor/gui/properties/SurfaceProperties.java index 95a76e51b..b5861545c 100644 --- a/src/tools/trackeditor/gui/properties/SurfaceProperties.java +++ b/src/tools/trackeditor/gui/properties/SurfaceProperties.java @@ -234,10 +234,15 @@ public class SurfaceProperties extends PropertyPanel { public void run() { - int lastTab = getEditorFrame().getProject().getPropertiesEditorSurfaceTab(); - + int lastTab = getEditorFrame().getProject().getPropertiesEditorSurfaceTab(); + if (lastTab == -1 && tabbedPane.getTabCount() > 0) + { + lastTab = 0; + } if (lastTab < tabbedPane.getTabCount()) + { tabbedPane.setSelectedIndex(lastTab); + } } }); } diff --git a/src/tools/trackeditor/gui/properties/TerrainProperties.java b/src/tools/trackeditor/gui/properties/TerrainProperties.java index 7c10ee710..7b975d535 100644 --- a/src/tools/trackeditor/gui/properties/TerrainProperties.java +++ b/src/tools/trackeditor/gui/properties/TerrainProperties.java @@ -478,9 +478,14 @@ public class TerrainProperties extends PropertyPanel public void run() { int lastTab = getEditorFrame().getProject().getPropertiesEditorTerrainTab(); - + if (lastTab == -1 && tabbedPane.getTabCount() > 0) + { + lastTab = 0; + } if (lastTab < tabbedPane.getTabCount()) + { tabbedPane.setSelectedIndex(lastTab); + } } }); } diff --git a/src/tools/trackeditor/gui/properties/TrackLightProperties.java b/src/tools/trackeditor/gui/properties/TrackLightProperties.java index 53bae6064..1a6cfeaf3 100644 --- a/src/tools/trackeditor/gui/properties/TrackLightProperties.java +++ b/src/tools/trackeditor/gui/properties/TrackLightProperties.java @@ -155,9 +155,14 @@ public class TrackLightProperties extends PropertyPanel public void run() { int lastTab = getEditorFrame().getProject().getPropertiesEditorLightTab(); - + if (lastTab == -1 && tabbedPane.getTabCount() > 0) + { + lastTab = 0; + } if (lastTab < tabbedPane.getTabCount()) + { tabbedPane.setSelectedIndex(lastTab); + } } }); } diff --git a/src/tools/trackeditor/utils/Properties.java b/src/tools/trackeditor/utils/Properties.java index 36438cde0..bb61e227e 100644 --- a/src/tools/trackeditor/utils/Properties.java +++ b/src/tools/trackeditor/utils/Properties.java @@ -34,7 +34,7 @@ public class Properties private static Properties instance = new Properties(); private Vector propertiesListeners = new Vector(); public final String title = "sd2-trackeditor"; - public final String version = "1.4.57"; + public final String version = "1.4.58"; private String path; private double imageScale = 1;