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

Merge pull request #3185 from ffissore/board-port-cut-off

Cut off board/port name when greater than 50
This commit is contained in:
Federico Fissore 2015-05-20 11:34:06 +02:00
commit 281fc68304

View File

@ -801,7 +801,7 @@ public class Editor extends JFrame implements RunnerListener {
if (sel == null) { if (sel == null) {
if (!name.equals(basename)) menu.setText(basename); if (!name.equals(basename)) menu.setText(basename);
} else { } else {
if (sel.length() > 17) sel = sel.substring(0, 16) + "..."; if (sel.length() > 50) sel = sel.substring(0, 50) + "...";
String newname = basename + ": \"" + sel + "\""; String newname = basename + ": \"" + sel + "\"";
if (!name.equals(newname)) menu.setText(newname); if (!name.equals(newname)) menu.setText(newname);
} }