MainForm - Change description when adding a folder

This commit is contained in:
miku-666
2024-04-28 18:21:34 +02:00
parent ea77b6b6d2
commit 9410f7a0ad

View File

@@ -1881,7 +1881,12 @@ namespace PckStudio
private void folderToolStripMenuItem_Click(object sender, EventArgs e)
{
TextPrompt folderNamePrompt = new TextPrompt();
if (treeViewMain.SelectedNode is not null) folderNamePrompt.contextLabel.Text = $"New folder at the location of \"{treeViewMain.SelectedNode.FullPath}\"";
if (treeViewMain.SelectedNode is not null)
folderNamePrompt.contextLabel.Text =
$"New folder at the location of \"{(
!treeViewMain.SelectedNode.IsTagOfType<PckAsset>()
? "/" + treeViewMain.SelectedNode.FullPath
: treeViewMain.SelectedNode.Parent == null ? "/" : "/" + treeViewMain.SelectedNode.Parent.FullPath)}\"";
folderNamePrompt.OKButtonText = "Add";
if (folderNamePrompt.ShowDialog(this) == DialogResult.OK)
{