trackeditor: fix graphic object properties combo box selection

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9124 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c4ede791712d9e72849d55735959b58c7173926e
Former-commit-id: 00d4aa8811108842a7672f6afeae26dbd17c5762
This commit is contained in:
iobyte 2023-08-21 21:07:32 +00:00
parent f9efb79881
commit b5742a7220
2 changed files with 6 additions and 3 deletions

View file

@ -238,17 +238,20 @@ public class GraphicObjectProperties extends PropertyPanel
fireTableCellUpdated(rowIndex, columnIndex); fireTableCellUpdated(rowIndex, columnIndex);
break; break;
case OBJECT_INDEX: case OBJECT_INDEX:
if (value.equals("Unknown")) {
String objectName = (String) value;
if ("Unknown".equals(objectName))
{ {
datum.color = graphicObjects.get(rowIndex).getColor(); datum.color = graphicObjects.get(rowIndex).getColor();
} }
else else
{ {
datum.color = getEditorFrame().getObjectColor(datum.name); datum.color = getEditorFrame().getObjectColor(objectName);
} }
fireTableCellUpdated(rowIndex, COLOR_INDEX); fireTableCellUpdated(rowIndex, COLOR_INDEX);
fireTableCellUpdated(rowIndex, columnIndex); fireTableCellUpdated(rowIndex, columnIndex);
break; break;
}
case COLOR_INDEX: case COLOR_INDEX:
datum.color = (Integer) value; datum.color = (Integer) value;
fireTableCellUpdated(rowIndex, columnIndex); fireTableCellUpdated(rowIndex, columnIndex);

View file

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