From efa6a1c9b24ba34456286b18360afc94da7e605c Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Wed, 17 Apr 2019 17:56:14 -0400 Subject: [PATCH] GT-2818 - Tool Options - fixed overwriting of saved 'auto-save' option --- .../java/ghidra/framework/main/FrontEndTool.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/FrontEndTool.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/FrontEndTool.java index 5fc2cc582d..76c2e5a2bf 100644 --- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/FrontEndTool.java +++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/FrontEndTool.java @@ -249,16 +249,6 @@ public class FrontEndTool extends PluginTool implements OptionsChangeListener { options.addOptionsChangeListener(this); } - // a place to clear options that are specific to the FrontEndTool and should be reset between - // opening projects - private void clearFrontEndOptions() { - // TODO: just for the record, it seems odd to me that you would want to the FrontEndTool - // to have the 'auto save' setting be different for different projects--no sir, I don' like it - ToolOptions options = getOptions("Tool"); - options.removeOptionsChangeListener(this); - options.removeOption(AUTOMATICALLY_SAVE_TOOLS); - } - @Override public void optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue) { @@ -295,7 +285,9 @@ public class FrontEndTool extends PluginTool implements OptionsChangeListener { return; } - clearFrontEndOptions(); + ToolOptions options = getOptions("Tool"); + options.removeOptionsChangeListener(this); + configureToolAction.setEnabled(true); setProject(project); AppInfo.setActiveProject(project);