From 55ef0e07b3337be93efe459ac2e081117a85d835 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:26:10 +0200 Subject: [PATCH 1/3] MainForm - Fix showing empty named folders and fix rename to show the actual file name --- PCK-Studio/MainForm.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index b5dddc51..02006287 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -393,6 +393,12 @@ namespace PckStudio } string nodeText = path.Substring(0, path.IndexOf(seperator)); string subPath = path.Substring(path.IndexOf(seperator) + 1); + + if (string.IsNullOrWhiteSpace(nodeText)) + { + return BuildNodeTreeBySeperator(root, subPath, seperator); + } + bool alreadyExists = root.ContainsKey(nodeText); TreeNode subNode = alreadyExists ? root[nodeText] : CreateNode(nodeText); if (!alreadyExists) root.Add(subNode); @@ -954,13 +960,15 @@ namespace PckStudio if (node == null) return; string path = node.FullPath; - using TextPrompt diag = new TextPrompt(node.Tag is null ? Path.GetFileName(node.FullPath) : node.FullPath); + bool isFile = node.TryGetTagData(out var file); + + using TextPrompt diag = new TextPrompt(isFile ? file.Filename : Path.GetFileName(node.FullPath)); if (diag.ShowDialog(this) == DialogResult.OK) { - if (node.Tag is PckFileData file) + if (isFile) { - if (currentPCK.TryGetFile(diag.NewText, file.Filetype, out _)) + if (currentPCK.Contains(diag.NewText, file.Filetype)) { MessageBox.Show(this, $"{diag.NewText} already exists", "File already exists"); return; From a9416b1201627096e83e59112b6a4a1c981cb7eb Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:28:02 +0200 Subject: [PATCH 2/3] MainForm - Fix drag n drop working when not moving dragged item into folder thus causing a useless move and refresh over the treview --- PCK-Studio/MainForm.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 02006287..a4010b49 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -1465,6 +1465,12 @@ namespace PckStudio return; } + if (targetNode.Parent == null && isTargetPckFile && draggedNode.Parent == null) + { + Debug.WriteLine("target node is file and is in the root... nothing done."); + return; + } + if ((targetNode.Parent?.Equals(draggedNode.Parent) ?? false) && isTargetPckFile) { Debug.WriteLine("target node and dragged node have the same parent... nothing done."); From 1622ea72acb94d1783fb0e597e0ef3c453da897e Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sat, 20 Apr 2024 11:12:44 +0200 Subject: [PATCH 3/3] CemuPanel - Change region name for japanese to "JP" --- PCK-Studio/Features/CemuPanel.Designer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PCK-Studio/Features/CemuPanel.Designer.cs b/PCK-Studio/Features/CemuPanel.Designer.cs index 95cb58fb..44f0b0c9 100644 --- a/PCK-Studio/Features/CemuPanel.Designer.cs +++ b/PCK-Studio/Features/CemuPanel.Designer.cs @@ -118,7 +118,7 @@ this.radioButtonEur.Size = new System.Drawing.Size(137, 30); this.radioButtonEur.TabIndex = 1; this.radioButtonEur.TabStop = true; - this.radioButtonEur.Text = "EUR"; + this.radioButtonEur.Text = "EU"; this.radioButtonEur.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.radioButtonEur.UseVisualStyleBackColor = false; this.radioButtonEur.Click += new System.EventHandler(this.radioButton_Click); @@ -164,7 +164,7 @@ this.radioButtonJap.Name = "radioButtonJap"; this.radioButtonJap.Size = new System.Drawing.Size(138, 30); this.radioButtonJap.TabIndex = 2; - this.radioButtonJap.Text = "JAP"; + this.radioButtonJap.Text = "JP"; this.radioButtonJap.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.radioButtonJap.UseVisualStyleBackColor = false; this.radioButtonJap.Click += new System.EventHandler(this.radioButton_Click);