From ada045a13b7afc3d5c75baf18d7f132cbaaf2b4c Mon Sep 17 00:00:00 2001 From: Zukero Date: Tue, 8 Aug 2017 18:25:01 +0200 Subject: [PATCH] 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. --- src/com/gpl/rpg/atcontentstudio/ui/JSONImportWizard.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/gpl/rpg/atcontentstudio/ui/JSONImportWizard.java b/src/com/gpl/rpg/atcontentstudio/ui/JSONImportWizard.java index 2d9c34f..f58e61a 100644 --- a/src/com/gpl/rpg/atcontentstudio/ui/JSONImportWizard.java +++ b/src/com/gpl/rpg/atcontentstudio/ui/JSONImportWizard.java @@ -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);