1
0
mirror of synced 2025-01-31 12:23:52 +01: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.IO;
using Switch_Toolbox.Library.Forms; using Switch_Toolbox.Library.Forms;
namespace FirstPlugin.Old namespace FirstPlugin
{ {
public class SARC : TreeNodeFile, IFileFormat public class SARC : TreeNodeFile, IFileFormat
{ {

View File

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

View File

@ -196,7 +196,7 @@ namespace Switch_Toolbox.Library.NodeWrappers
Replace(ofd.FileName); 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 RenameAction(object sender, EventArgs e) { Rename(); }
protected void SortAction(object sender, EventArgs e) { Sort(); } protected void SortAction(object sender, EventArgs e) { Sort(); }
protected void ClearAction(object sender, EventArgs e) { Clear(); } protected void ClearAction(object sender, EventArgs e) { Clear(); }