Fixed AddCategory feature not making nodes

This commit is contained in:
MattNL
2022-08-06 15:11:38 -04:00
parent 916fc4c40d
commit e5b2588b6f
2 changed files with 7 additions and 1 deletions

View File

@@ -197,6 +197,12 @@ namespace PckStudio.Forms.Editor
using addCategory add = new addCategory(avalible);
if (add.ShowDialog() == DialogResult.OK)
audioFile.AddCategory(GetCategoryId(add.Category));
else return;
var category = audioFile.GetCategory(GetCategoryId(add.Category));
TreeNode treeNode = new TreeNode(GetCategoryFromId(category.audioType), (int)category.audioType, (int)category.audioType);
treeNode.Tag = category;
treeView1.Nodes.Add(treeNode);
}
else
{

View File

@@ -598,7 +598,7 @@ namespace PckStudio
break;
case 9 when file.filepath == "colours.col":
if (file.FileSize == 0)
if (file.size == 0)
{
MessageBox.Show("No Color data found.", "Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);