1
0
mirror of synced 2024-09-24 11:38:22 +02:00

Avoid unloading nodes if dialog is set to no

This commit is contained in:
KillzXGaming 2019-07-07 10:04:53 -04:00
parent 500cb7b9a5
commit 7bbd06701f
8 changed files with 4 additions and 3 deletions

Binary file not shown.

View File

@ -9,7 +9,7 @@ using Switch_Toolbox.Library;
using Switch_Toolbox.Library.IO;
using Switch_Toolbox.Library.Forms;
namespace FirstPlugin.Old
namespace FirstPlugin
{
public class SARC : TreeNodeFile, IFileFormat
{

View File

@ -115,7 +115,6 @@ namespace Bfres.Structs
public override void Delete()
{
DialogResult dialogResult = MessageBox.Show("Are you sure you want to remove this model? This cannot be undone!", "", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{
Skeleton.bones.Clear();
@ -130,6 +129,8 @@ namespace Bfres.Structs
((BFRESGroupNode)Parent).RemoveChild(this);
LibraryGUI.Instance.UpdateViewport();
Unload();
}
}

View File

@ -196,7 +196,7 @@ namespace Switch_Toolbox.Library.NodeWrappers
Replace(ofd.FileName);
}
}
protected void DeleteAction(object sender, EventArgs e) { Delete(); Unload(); }
protected void DeleteAction(object sender, EventArgs e) { Delete();}
protected void RenameAction(object sender, EventArgs e) { Rename(); }
protected void SortAction(object sender, EventArgs e) { Sort(); }
protected void ClearAction(object sender, EventArgs e) { Clear(); }