This commit is contained in:
OMGeeky
2025-06-16 12:38:00 +02:00
parent 57cf71da17
commit 829bb336b8
3 changed files with 3 additions and 11 deletions

View File

@@ -164,7 +164,7 @@ public class DroplistEditor extends JSONElementEditor {
if (idChanging()) { if (idChanging()) {
droplist.id = (String) value; droplist.id = (String) value;
DroplistEditor.this.name = droplist.getDesc(); DroplistEditor.this.name = droplist.getDesc();
droplist.childrenChanged(new ArrayList<ProjectTreeNode>()); droplist.childrenChanged(new ArrayList<>());
ATContentStudio.frame.editorChanged(DroplistEditor.this); ATContentStudio.frame.editorChanged(DroplistEditor.this);
} else { } else {
cancelIdEdit(idField); cancelIdEdit(idField);
@@ -196,7 +196,7 @@ public class DroplistEditor extends JSONElementEditor {
if (droplist.state != GameDataElement.State.modified) { if (droplist.state != GameDataElement.State.modified) {
droplist.state = GameDataElement.State.modified; droplist.state = GameDataElement.State.modified;
DroplistEditor.this.name = droplist.getDesc(); DroplistEditor.this.name = droplist.getDesc();
droplist.childrenChanged(new ArrayList<ProjectTreeNode>()); droplist.childrenChanged(new ArrayList<>());
ATContentStudio.frame.editorChanged(DroplistEditor.this); ATContentStudio.frame.editorChanged(DroplistEditor.this);
} }
updateJsonViewText(droplist.toJsonString()); updateJsonViewText(droplist.toJsonString());

View File

@@ -6,7 +6,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
import javax.swing.DefaultListCellRenderer; import javax.swing.DefaultListCellRenderer;
@@ -18,15 +17,8 @@ import javax.swing.JLabel;
import javax.swing.JList; import javax.swing.JList;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JRadioButton; import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JSpinner; import javax.swing.JSpinner;
import javax.swing.JTextField; import javax.swing.JTextField;
import javax.swing.ListModel;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import com.gpl.rpg.atcontentstudio.ATContentStudio; import com.gpl.rpg.atcontentstudio.ATContentStudio;
import com.gpl.rpg.atcontentstudio.model.GameDataElement; import com.gpl.rpg.atcontentstudio.model.GameDataElement;

View File

@@ -267,7 +267,7 @@ public final class CommonEditor {
} }
List<ListDataListener> listeners = new CopyOnWriteArrayList<ListDataListener>(); List<ListDataListener> listeners = new CopyOnWriteArrayList<>();
@Override @Override
public void addListDataListener(ListDataListener l) { public void addListDataListener(ListDataListener l) {