Skip to content

Commit

Permalink
IDE: Fixed default board selection.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Nov 20, 2014
1 parent b9e186e commit 85aecfe
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions arduino-core/src/processing/app/debug/TargetPlatform.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ public TargetPlatform(String _name, File _folder, TargetPackage parent)
boardsPreferences.remove("menu");

// Create boards
Set<String> boardIDs = boardsPreferences.keySet();
for (String id : boardIDs) {
PreferencesMap preferences = boardsPreferences.get(id);
TargetBoard board = new TargetBoard(id, preferences, this);
boards.put(id, board);
}
if (!boardIDs.isEmpty()) {
PreferencesMap preferences = boardsPreferences.get(boardIDs.iterator().next());
defaultBoard = new TargetBoard(id, preferences, this);
Set<String> boardIds = boardsPreferences.keySet();
for (String boardId : boardIds) {
PreferencesMap preferences = boardsPreferences.get(boardId);
TargetBoard board = new TargetBoard(boardId, preferences, this);
boards.put(boardId, board);

// Pick the first board as default
if (defaultBoard == null)
defaultBoard = board;
}
} catch (IOException e) {
throw new TargetPlatformException(format(_("Error loading {0}"),
Expand Down

0 comments on commit 85aecfe

Please sign in to comment.