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 Former-commit-id: 3e96800298920a3f9e4fa4d7478d2a9ccbdadd28 Former-commit-id: d3e3a42e124cdc78bdac70730919db477da1afdb
This commit is contained in:
parent
69134667a7
commit
6c3a1aa88a
6 changed files with 32 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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.57";
|
||||
public final String version = "1.4.58";
|
||||
private String path;
|
||||
|
||||
private double imageScale = 1;
|
||||
|
|
Loading…
Reference in a new issue