diff --git a/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditor.cs b/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditor.cs index 6455ba05..98507339 100644 --- a/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditor.cs +++ b/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditor.cs @@ -178,6 +178,8 @@ namespace Toolbox.Library.Forms if (viewport != null) viewport.FormClosing(); + + if (ObjectTree != null) ObjectTree.FormClosing(); } diff --git a/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditorTree.cs b/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditorTree.cs index f2730037..33ef327a 100644 --- a/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditorTree.cs +++ b/Switch_Toolbox_Library/Forms/Editors/Object Editor/ObjectEditorTree.cs @@ -230,6 +230,12 @@ namespace Toolbox.Library.Forms public void FormClosing() { + if (searchForm != null) + { + searchForm.Close(); + searchForm.Dispose(); + } + foreach (var control in stPanel2.Controls) { if (control is STUserControl) @@ -519,10 +525,11 @@ namespace Toolbox.Library.Forms } } + private SearchNodeForm searchForm; private void searchFormToolStrip_Click(object sender, EventArgs e) { - SearchNodeForm form = new SearchNodeForm(treeViewCustom1); - form.Show(this); + searchForm = new SearchNodeForm(treeViewCustom1); + searchForm.Show(this); } } } diff --git a/Switch_Toolbox_Library/Toolbox.Library.dll b/Switch_Toolbox_Library/Toolbox.Library.dll index f0baea8f..b8843684 100644 Binary files a/Switch_Toolbox_Library/Toolbox.Library.dll and b/Switch_Toolbox_Library/Toolbox.Library.dll differ diff --git a/Switch_Toolbox_Library/Toolbox.Library.pdb b/Switch_Toolbox_Library/Toolbox.Library.pdb index b95312e2..9c974a6c 100644 Binary files a/Switch_Toolbox_Library/Toolbox.Library.pdb and b/Switch_Toolbox_Library/Toolbox.Library.pdb differ