Skip to content

Commit 4fffcd6

Browse files
committed
Editor: use TargetBoard.getName() to get board name
1 parent 6c50007 commit 4fffcd6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/processing/app/Editor.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
import cc.arduino.view.findreplace.FindReplace;
9494
import jssc.SerialPortException;
9595
import processing.app.debug.RunnerException;
96+
import processing.app.debug.TargetBoard;
9697
import processing.app.forms.PasswordAuthorizationDialog;
9798
import processing.app.helpers.DocumentTextChangeListener;
9899
import processing.app.helpers.Keys;
@@ -2580,9 +2581,9 @@ private void statusEmpty() {
25802581
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25812582

25822583
protected void onBoardOrPortChange() {
2583-
Map<String, String> boardPreferences = BaseNoGui.getBoardPreferences();
2584-
if (boardPreferences != null)
2585-
lineStatus.setBoardName(boardPreferences.get("name"));
2584+
TargetBoard board = BaseNoGui.getTargetBoard();
2585+
if (board != null)
2586+
lineStatus.setBoardName(board.getName());
25862587
else
25872588
lineStatus.setBoardName("-");
25882589
lineStatus.setPort(PreferencesData.get("serial.port"));

0 commit comments

Comments
 (0)