mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
Fixed JSON import of existing element.
When an imported item was already present in the game sources, it wasnt associated with the correct file, leading to trouble.
This commit is contained in:
@@ -338,6 +338,7 @@ public class JSONImportWizard extends JDialog {
|
||||
} else if (existingNode.getDataType() == GameSource.Type.altered) {
|
||||
errors.add("An item with id "+node.id+" is already altered in this project.");
|
||||
} else {
|
||||
node.jsonFile = existingNode.jsonFile;
|
||||
warnings.add("An item with id "+node.id+" exists in the used game source. This one will be inserted as \"altered\"");
|
||||
}
|
||||
existingNode = null;
|
||||
@@ -412,7 +413,7 @@ public class JSONImportWizard extends JDialog {
|
||||
proj.createElements(created);
|
||||
JSONElement lastNode = created.get(created.size() - 1);
|
||||
if (lastNode != null) {
|
||||
lastNode.save();
|
||||
// lastNode.save();
|
||||
ATContentStudio.frame.selectInTree(lastNode);
|
||||
}
|
||||
JSONImportWizard.this.setVisible(false);
|
||||
|
||||
Reference in New Issue
Block a user