mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-01-03 01:52:36 +01:00
Progress on Dialogue Sketch to JSON Data conversion.
Opportunistic bug fix in JSON import wizard.
This commit is contained in:
@@ -404,11 +404,8 @@ public class JSONImportWizard extends JDialog {
|
||||
okListener = new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JSONElement lastNode = null;
|
||||
for (JSONElement node : created) {
|
||||
proj.createElement(node);
|
||||
lastNode = node;
|
||||
}
|
||||
proj.createElements(created);
|
||||
JSONElement lastNode = created.get(created.size() - 1);
|
||||
if (lastNode != null) {
|
||||
lastNode.save();
|
||||
ATContentStudio.frame.selectInTree(lastNode);
|
||||
|
||||
@@ -342,12 +342,7 @@ public class WorkspaceActions {
|
||||
if (selectedNode == null || selectedNode.getProject() == null || !(selectedNode instanceof WriterModeData)) return;
|
||||
WriterModeData wData = (WriterModeData)selectedNode;
|
||||
Collection<Dialogue> exported = wData.toDialogue();
|
||||
for (Dialogue dialogue : exported) {
|
||||
selectedNode.getProject().createElement(dialogue);
|
||||
}
|
||||
for (Dialogue dialogue : exported) {
|
||||
dialogue.link();
|
||||
}
|
||||
selectedNode.getProject().createElements(new ArrayList<JSONElement>(exported));
|
||||
};
|
||||
public void selectionChanged(ProjectTreeNode selectedNode, TreePath[] selectedPaths) {
|
||||
setEnabled(selectedNode != null && selectedNode instanceof WriterModeData);
|
||||
|
||||
Reference in New Issue
Block a user