From 62005511e8d02359b5a86d95cfbb82ecd4081e28 Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Fri, 6 Sep 2019 18:04:52 -0400 Subject: [PATCH] Fix applying bfres settings from the context menu --- .../NodeWrappers/Archives/BFRESWrapper.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/File_Format_Library/NodeWrappers/Archives/BFRESWrapper.cs b/File_Format_Library/NodeWrappers/Archives/BFRESWrapper.cs index 7159a296..32dbd4ed 100644 --- a/File_Format_Library/NodeWrappers/Archives/BFRESWrapper.cs +++ b/File_Format_Library/NodeWrappers/Archives/BFRESWrapper.cs @@ -33,7 +33,10 @@ namespace FirstPlugin.NodeWrappers List Items = new List(); Items.AddRange(base.GetContextMenuItems()); SettingsToolStrip = new ToolStripMenuItem("Settings", null); - SettingsToolStrip.DropDownItems.Add(new ToolStripMenuItem("Remove Unused Textures on Save", null, SettingBooleanAction)); + SettingsToolStrip.DropDownItems.Add(new ToolStripMenuItem("Remove Unused Textures on Save", null, SettingBooleanAction) + { + Checked = SettingRemoveUnusedTextures, + }); Items.Add(SettingsToolStrip); return Items.ToArray(); } @@ -43,9 +46,9 @@ namespace FirstPlugin.NodeWrappers if (sender is ToolStripMenuItem) { if (((ToolStripMenuItem)sender).Checked) - ((ToolStripMenuItem)sender).Checked = false; + SettingRemoveUnusedTextures = false; else - ((ToolStripMenuItem)sender).Checked = true; + SettingRemoveUnusedTextures = true; } }