1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-02 13:24:12 +01:00

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.
This commit is contained in:
Matthijs Kooijman 2013-10-25 12:39:15 +02:00
parent d5cc92d8ab
commit 89fa1c4bbd

View File

@ -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());