trackeditor: fix exception from empty comment
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9327 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
parent
35d222e77c
commit
15188465a4
|
@ -31,6 +31,7 @@ import javax.swing.table.TableColumn;
|
|||
|
||||
import gui.EditorFrame;
|
||||
import gui.TrackObjectDialog;
|
||||
import utils.MutableString;
|
||||
import utils.circuit.GraphicObject;
|
||||
|
||||
public class GraphicObjectProperties extends PropertyPanel
|
||||
|
@ -469,6 +470,7 @@ public class GraphicObjectProperties extends PropertyPanel
|
|||
public void exit()
|
||||
{
|
||||
int minDataCount = Math.min(data.size(), graphicObjects.size());
|
||||
MutableString stringResult = new MutableString();
|
||||
|
||||
if (data.size() != graphicObjects.size())
|
||||
{
|
||||
|
@ -479,15 +481,15 @@ public class GraphicObjectProperties extends PropertyPanel
|
|||
GraphicObjectData datum = data.get(j);
|
||||
GraphicObject object = graphicObjects.get(j);
|
||||
|
||||
if (!datum.name.equals(object.getName()))
|
||||
if (isDifferent(object.getName(), datum.name, stringResult))
|
||||
{
|
||||
object.setName(datum.name);
|
||||
object.setName(stringResult.getValue());
|
||||
getEditorFrame().documentIsModified = true;
|
||||
}
|
||||
|
||||
if (!datum.comment.equals(object.getComment()))
|
||||
if (isDifferent(object.getComment(), datum.comment, stringResult))
|
||||
{
|
||||
object.setComment(datum.comment);
|
||||
object.setComment(stringResult.getValue());
|
||||
getEditorFrame().documentIsModified = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.46";
|
||||
public final String version = "1.4.47";
|
||||
private String path;
|
||||
|
||||
private double imageScale = 1;
|
||||
|
|
Loading…
Reference in New Issue