Skip to content

Commit 2647ce3

Browse files
committed
Editor: fixed port ordering in tools menu
1 parent d5e0e59 commit 2647ce3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: app/src/processing/app/Editor.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,8 @@ private void populatePortMenu() {
10601060
Collections.sort(ports, new Comparator<BoardPort>() {
10611061
@Override
10621062
public int compare(BoardPort o1, BoardPort o2) {
1063-
return BOARD_PROTOCOLS_ORDER.indexOf(o1.getProtocol()) - BOARD_PROTOCOLS_ORDER.indexOf(o2.getProtocol());
1063+
return (BOARD_PROTOCOLS_ORDER.indexOf(o1.getProtocol()) - BOARD_PROTOCOLS_ORDER.indexOf(o2.getProtocol())) * 10 +
1064+
o1.getAddress().compareTo(o2.getAddress());
10641065
}
10651066
});
10661067

0 commit comments

Comments
 (0)