mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-16 20:17:30 +08:00
Don't close console when exiting form and fix opening RPF's after refresh in ExtraRootFolders
Console close is already handled in application exit and since the NamedPipe opens other instances within the same instance this would close the console while codewalker is still open
This commit is contained in:
parent
8c2e444049
commit
f21d83cf40
@ -535,13 +535,23 @@ namespace CodeWalker
|
|||||||
if ((CurrentFolder != null) && (CurrentFolder.Path.Equals(path, StringComparison.InvariantCultureIgnoreCase)))
|
if ((CurrentFolder != null) && (CurrentFolder.Path.Equals(path, StringComparison.InvariantCultureIgnoreCase)))
|
||||||
return; //already there
|
return; //already there
|
||||||
var hierarchy = pathl.Split(new[] { '\\' }, StringSplitOptions.RemoveEmptyEntries);
|
var hierarchy = pathl.Split(new[] { '\\' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
TreeNode? n = MainTreeView.Nodes[0];// FindTreeNode("gta v", null);
|
TreeNode? n = null;// FindTreeNode("gta v", null);
|
||||||
if (!string.IsNullOrEmpty(path))
|
if (!string.IsNullOrEmpty(path))
|
||||||
{
|
{
|
||||||
|
// Loop over all nodes, otherwise RPF's in other folders can't be found
|
||||||
|
foreach(var startNode in MainTreeView.Nodes)
|
||||||
|
{
|
||||||
|
n = (TreeNode?)startNode;
|
||||||
for (int i = 0; i < hierarchy.Length; i++)
|
for (int i = 0; i < hierarchy.Length; i++)
|
||||||
{
|
{
|
||||||
n = FindTreeNode(hierarchy[i], n);
|
n = FindTreeNode(hierarchy[i], n);
|
||||||
}
|
}
|
||||||
|
if (n is not null)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (n != null)
|
if (n != null)
|
||||||
{
|
{
|
||||||
@ -3888,7 +3898,6 @@ namespace CodeWalker
|
|||||||
|
|
||||||
if (m.Msg == 0x10) // WM_CLOSE
|
if (m.Msg == 0x10) // WM_CLOSE
|
||||||
{
|
{
|
||||||
ConsoleWindow.Close();
|
|
||||||
CancellationTokenSource.Cancel();
|
CancellationTokenSource.Cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user