mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Show BoardName.boardName field in 'Ports' menu
...instead of putting it into the 'label' field during discovery.
This commit is contained in:
parent
ec4787a92b
commit
9ba172b0db
@ -1041,18 +1041,23 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
private BoardPort port;
|
||||
|
||||
public BoardPortJCheckBoxMenuItem(BoardPort port) {
|
||||
super(port.getLabel());
|
||||
super();
|
||||
this.port = port;
|
||||
setText(toString());
|
||||
addActionListener(e -> {
|
||||
selectSerialPort(port.getAddress());
|
||||
base.onBoardOrPortChange();
|
||||
});
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// This is required for serialPrompt()
|
||||
return port.getLabel();
|
||||
String label = port.getLabel();
|
||||
if (port.getBoardName() != null && !port.getBoardName().isEmpty()) {
|
||||
label += " (" + port.getBoardName() + ")";
|
||||
}
|
||||
return label;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,9 +196,6 @@ public class SerialDiscovery implements Discovery, Runnable {
|
||||
TargetBoard board = (TargetBoard) boardData.get("board");
|
||||
if (board != null) {
|
||||
String boardName = board.getName();
|
||||
if (boardName != null) {
|
||||
label += " (" + boardName + ")";
|
||||
}
|
||||
boardPort.setBoardName(boardName);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user