From 89fa1c4bbd0adc2ba510c4ac2b611d2132248be4 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Fri, 25 Oct 2013 12:39:15 +0200 Subject: [PATCH] Don't re-set board preference when changing custom suboptions Since the custom suboptions are only visible when their associated board is the currently selected one, there is no point in re-setting the current board when a suboption is selected. --- app/src/processing/app/Base.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 21a765726..274027af5 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -1373,23 +1373,12 @@ public class Base { @SuppressWarnings("serial") Action subAction = new AbstractAction(_(boardCustomMenu.get(customMenuOption))) { public void actionPerformed(ActionEvent e) { - Preferences.set("target_package", (String) getValue("package")); - Preferences.set("target_platform", (String) getValue("platform")); - Preferences.set("board", (String) getValue("board")); Preferences.set("custom_" + menuId, getValue("board") + "_" + getValue("custom_menu_option")); - - filterVisibilityOfSubsequentBoardMenus((String) getValue("board"), currentIndex); - - onBoardOrPortChange(); Sketch.buildSettingChanged(); - rebuildImportMenu(Editor.importMenu); - rebuildExamplesMenu(Editor.examplesMenu); } }; subAction.putValue("board", boardId); subAction.putValue("custom_menu_option", customMenuOption); - subAction.putValue("package", packageName); - subAction.putValue("platform", platformName); if (!buttonGroupsMap.containsKey(menuId)) { buttonGroupsMap.put(menuId, new ButtonGroup());