trackeditor: fix setting last tab when there in no last tab
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9342 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
parent
f5b67929d0
commit
4b0770f172
|
@ -150,9 +150,14 @@ public class CameraProperties extends PropertyPanel
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
int lastTab = getEditorFrame().getProject().getPropertiesEditorCameraTab();
|
int lastTab = getEditorFrame().getProject().getPropertiesEditorCameraTab();
|
||||||
|
if (lastTab == -1 && tabbedPane.getTabCount() > 0)
|
||||||
|
{
|
||||||
|
lastTab = 0;
|
||||||
|
}
|
||||||
if (lastTab < tabbedPane.getTabCount())
|
if (lastTab < tabbedPane.getTabCount())
|
||||||
|
{
|
||||||
tabbedPane.setSelectedIndex(lastTab);
|
tabbedPane.setSelectedIndex(lastTab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -247,9 +247,14 @@ public class ObjectProperties extends PropertyPanel
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
int lastTab = getEditorFrame().getProject().getPropertiesEditorObjectTab();
|
int lastTab = getEditorFrame().getProject().getPropertiesEditorObjectTab();
|
||||||
|
if (lastTab == -1 && tabbedPane.getTabCount() > 0)
|
||||||
|
{
|
||||||
|
lastTab = 0;
|
||||||
|
}
|
||||||
if (lastTab < tabbedPane.getTabCount())
|
if (lastTab < tabbedPane.getTabCount())
|
||||||
|
{
|
||||||
tabbedPane.setSelectedIndex(lastTab);
|
tabbedPane.setSelectedIndex(lastTab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,10 +234,15 @@ public class SurfaceProperties extends PropertyPanel
|
||||||
{
|
{
|
||||||
public void run()
|
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())
|
if (lastTab < tabbedPane.getTabCount())
|
||||||
|
{
|
||||||
tabbedPane.setSelectedIndex(lastTab);
|
tabbedPane.setSelectedIndex(lastTab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -478,9 +478,14 @@ public class TerrainProperties extends PropertyPanel
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
int lastTab = getEditorFrame().getProject().getPropertiesEditorTerrainTab();
|
int lastTab = getEditorFrame().getProject().getPropertiesEditorTerrainTab();
|
||||||
|
if (lastTab == -1 && tabbedPane.getTabCount() > 0)
|
||||||
|
{
|
||||||
|
lastTab = 0;
|
||||||
|
}
|
||||||
if (lastTab < tabbedPane.getTabCount())
|
if (lastTab < tabbedPane.getTabCount())
|
||||||
|
{
|
||||||
tabbedPane.setSelectedIndex(lastTab);
|
tabbedPane.setSelectedIndex(lastTab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,9 +155,14 @@ public class TrackLightProperties extends PropertyPanel
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
int lastTab = getEditorFrame().getProject().getPropertiesEditorLightTab();
|
int lastTab = getEditorFrame().getProject().getPropertiesEditorLightTab();
|
||||||
|
if (lastTab == -1 && tabbedPane.getTabCount() > 0)
|
||||||
|
{
|
||||||
|
lastTab = 0;
|
||||||
|
}
|
||||||
if (lastTab < tabbedPane.getTabCount())
|
if (lastTab < tabbedPane.getTabCount())
|
||||||
|
{
|
||||||
tabbedPane.setSelectedIndex(lastTab);
|
tabbedPane.setSelectedIndex(lastTab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class Properties
|
||||||
private static Properties instance = new Properties();
|
private static Properties instance = new Properties();
|
||||||
private Vector<ActionListener> propertiesListeners = new Vector<ActionListener>();
|
private Vector<ActionListener> propertiesListeners = new Vector<ActionListener>();
|
||||||
public final String title = "sd2-trackeditor";
|
public final String title = "sd2-trackeditor";
|
||||||
public final String version = "1.4.57";
|
public final String version = "1.4.58";
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
private double imageScale = 1;
|
private double imageScale = 1;
|
||||||
|
|
Loading…
Reference in New Issue