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:
parent
d5cc92d8ab
commit
89fa1c4bbd
@ -1373,23 +1373,12 @@ public class Base {
|
|||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
Action subAction = new AbstractAction(_(boardCustomMenu.get(customMenuOption))) {
|
Action subAction = new AbstractAction(_(boardCustomMenu.get(customMenuOption))) {
|
||||||
public void actionPerformed(ActionEvent e) {
|
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"));
|
Preferences.set("custom_" + menuId, getValue("board") + "_" + getValue("custom_menu_option"));
|
||||||
|
|
||||||
filterVisibilityOfSubsequentBoardMenus((String) getValue("board"), currentIndex);
|
|
||||||
|
|
||||||
onBoardOrPortChange();
|
|
||||||
Sketch.buildSettingChanged();
|
Sketch.buildSettingChanged();
|
||||||
rebuildImportMenu(Editor.importMenu);
|
|
||||||
rebuildExamplesMenu(Editor.examplesMenu);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
subAction.putValue("board", boardId);
|
subAction.putValue("board", boardId);
|
||||||
subAction.putValue("custom_menu_option", customMenuOption);
|
subAction.putValue("custom_menu_option", customMenuOption);
|
||||||
subAction.putValue("package", packageName);
|
|
||||||
subAction.putValue("platform", platformName);
|
|
||||||
|
|
||||||
if (!buttonGroupsMap.containsKey(menuId)) {
|
if (!buttonGroupsMap.containsKey(menuId)) {
|
||||||
buttonGroupsMap.put(menuId, new ButtonGroup());
|
buttonGroupsMap.put(menuId, new ButtonGroup());
|
||||||
|
Loading…
Reference in New Issue
Block a user