mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Editor: use TargetBoard.getName() to get board name
This commit is contained in:
parent
6c50007e22
commit
4fffcd6e1a
@ -93,6 +93,7 @@ import cc.arduino.view.StubMenuListener;
|
||||
import cc.arduino.view.findreplace.FindReplace;
|
||||
import jssc.SerialPortException;
|
||||
import processing.app.debug.RunnerException;
|
||||
import processing.app.debug.TargetBoard;
|
||||
import processing.app.forms.PasswordAuthorizationDialog;
|
||||
import processing.app.helpers.DocumentTextChangeListener;
|
||||
import processing.app.helpers.Keys;
|
||||
@ -2580,9 +2581,9 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
||||
|
||||
protected void onBoardOrPortChange() {
|
||||
Map<String, String> boardPreferences = BaseNoGui.getBoardPreferences();
|
||||
if (boardPreferences != null)
|
||||
lineStatus.setBoardName(boardPreferences.get("name"));
|
||||
TargetBoard board = BaseNoGui.getTargetBoard();
|
||||
if (board != null)
|
||||
lineStatus.setBoardName(board.getName());
|
||||
else
|
||||
lineStatus.setBoardName("-");
|
||||
lineStatus.setPort(PreferencesData.get("serial.port"));
|
||||
|
Loading…
Reference in New Issue
Block a user