Skip to content

Commit 5422c49

Browse files
committed
2 parents 6ab8579 + 350e825 commit 5422c49

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

app/src/processing/app/Base.java

+12-10
Original file line numberDiff line numberDiff line change
@@ -1704,18 +1704,20 @@ public void rebuildProgrammerMenu() {
17041704
ButtonGroup group = new ButtonGroup();
17051705

17061706
TargetBoard board = BaseNoGui.getTargetBoard();
1707-
TargetPlatform boardPlatform = board.getContainerPlatform();
1708-
TargetPlatform corePlatform = null;
1707+
if (board != null) {
1708+
TargetPlatform boardPlatform = board.getContainerPlatform();
1709+
TargetPlatform corePlatform = null;
17091710

1710-
String core = board.getPreferences().get("build.core");
1711-
if (core != null && core.contains(":")) {
1712-
String[] split = core.split(":", 2);
1713-
corePlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
1714-
}
1711+
String core = board.getPreferences().get("build.core");
1712+
if (core != null && core.contains(":")) {
1713+
String[] split = core.split(":", 2);
1714+
corePlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]);
1715+
}
17151716

1716-
addProgrammersForPlatform(boardPlatform, programmerMenus, group);
1717-
if (corePlatform != null)
1718-
addProgrammersForPlatform(corePlatform, programmerMenus, group);
1717+
addProgrammersForPlatform(boardPlatform, programmerMenus, group);
1718+
if (corePlatform != null)
1719+
addProgrammersForPlatform(corePlatform, programmerMenus, group);
1720+
}
17191721

17201722
if (programmerMenus.isEmpty()) {
17211723
JMenuItem item = new JMenuItem(tr("No programmers available for this board"));

app/src/processing/app/EditorToolbar.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
6262
* Titles for each button when the shift key is pressed.
6363
*/
6464
private static final String[] titleShift = {
65-
tr("Verify"), tr("Upload Using Programmer"), tr("New"), tr("Open"), tr("Save As..."), tr("Serial Monitor")
65+
tr("Verify"), tr("Upload Using Programmer"), tr("New"), tr("Open"), tr("Save As..."), tr("Serial Plotter")
6666
};
6767

6868
private static final int BUTTON_COUNT = title.length;
@@ -500,7 +500,11 @@ private void handleSelectionPressed(int sel, boolean isShiftDown, int x, int y)
500500
break;
501501

502502
case SERIAL:
503-
editor.handleSerial();
503+
if (isShiftDown) {
504+
editor.handlePlotter();
505+
} else {
506+
editor.handleSerial();
507+
}
504508
break;
505509

506510
default:

0 commit comments

Comments
 (0)