Skip to content
Snippets Groups Projects
Commit e1672281 authored by biwa's avatar biwa
Browse files

UDBScript: fixed a problem where hot reloading would not select the previously selected script

parent 8c30cef6
No related branches found
No related tags found
No related merge requests found
......@@ -235,7 +235,6 @@ namespace CodeImp.DoomBuilder.UDBScript
filetree.Nodes.Clear();
filetree.Nodes.AddRange(AddToTree(filtertext, BuilderPlug.Me.ScriptDirectoryStructure));
//filetree.ExpandAll();
foreach(TreeNode node in filetree.Nodes)
{
......@@ -259,6 +258,10 @@ namespace CodeImp.DoomBuilder.UDBScript
/// <returns>Found TreeNode or null</returns>
private TreeNode FindScriptTreeNode(string name, TreeNode root)
{
// The "root" node might already be the one we're looking for
if (root.Tag is ScriptInfo && ((ScriptInfo)root.Tag).ScriptFile == name)
return root;
foreach (TreeNode node in root.Nodes)
{
if (node.Tag is ScriptInfo && ((ScriptInfo)node.Tag).ScriptFile == name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment