Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
Merge pull request #7 from radiatoryang/develop
Browse files Browse the repository at this point in the history
oops, forgot to do one last fix
  • Loading branch information
radiatoryang authored Aug 31, 2018
2 parents 41cb15d + e2a868c commit 8535879
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Assets/Merino/Editor/MerinoEditorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,17 @@ string SaveNodesAsString()
// gather data
ValidateNodeTitles();
var nodeInfo = new List<YarnSpinnerLoader.NodeInfo>();

// grab nodes based on visible order in the hierarchy tree view (sorting)

// first, in order to properly export, we need to expand everything
var previousExpanded = treeView.GetExpanded();
treeView.ExpandAll();
// then grab the nodes
var treeNodes = treeView.GetRows().Select(x => treeView.treeModel.Find(x.id)).ToArray(); // treeData.treeElements; // m_TreeView.treeModel.root.children;
// then set the expanded nodes back to what they were
treeView.SetExpanded(previousExpanded);

// save data to string
foreach (var item in treeNodes)
{
Expand Down

0 comments on commit 8535879

Please sign in to comment.