1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-28 09:24:14 +01:00

Merge pull request #11028 from n-elia/add-shift-click-to-serial-monitor-button-on-toolbar

Add Shift+click on serial monitor toolbar button to open serial plotter
This commit is contained in:
Martino Facchin 2020-12-04 17:06:27 +01:00 committed by GitHub
commit 350e825217
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
* Titles for each button when the shift key is pressed.
*/
private static final String[] titleShift = {
tr("Verify"), tr("Upload Using Programmer"), tr("New"), tr("Open"), tr("Save As..."), tr("Serial Monitor")
tr("Verify"), tr("Upload Using Programmer"), tr("New"), tr("Open"), tr("Save As..."), tr("Serial Plotter")
};
private static final int BUTTON_COUNT = title.length;
@ -500,7 +500,11 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
break;
case SERIAL:
editor.handleSerial();
if (isShiftDown) {
editor.handlePlotter();
} else {
editor.handleSerial();
}
break;
default: