trackeditor: warn about invalid object parameters

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9219 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
iobyte 2023-11-10 15:42:31 +00:00
parent 2ddcd1c502
commit c2951db895
2 changed files with 9 additions and 17 deletions

View File

@ -177,22 +177,6 @@ public class TrackObjectDialog extends JDialog
return objectData.name;
}
private void setObjectName(String name)
{
if (objectShape != null)
{
objectShape.setName(name);
return;
}
if (graphicObjectDatum != null)
{
graphicObjectDatum.name = name;
return;
}
objectData.name = name;
}
private Point2D.Double getTrackLocation()
{
@ -608,6 +592,8 @@ public class TrackObjectDialog extends JDialog
}
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog(this, "Invalid orientation!\n\n" + e.getLocalizedMessage(), "Error", JOptionPane.ERROR_MESSAGE);
return;
}
}
@ -624,6 +610,8 @@ public class TrackObjectDialog extends JDialog
}
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog(this, "Invalid height!\n\n" + e.getLocalizedMessage(), "Error", JOptionPane.ERROR_MESSAGE);
return;
}
}
}
@ -657,6 +645,8 @@ public class TrackObjectDialog extends JDialog
}
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog(this, "Invalid orientation!\n\n" + e.getLocalizedMessage(), "Error", JOptionPane.ERROR_MESSAGE);
return;
}
}
@ -673,6 +663,8 @@ public class TrackObjectDialog extends JDialog
}
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog(this, "Invalid height!\n\n" + e.getLocalizedMessage(), "Error", JOptionPane.ERROR_MESSAGE);
return;
}
}
}

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