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

Call setScrollerFor port menu only once

This commit is contained in:
Martino Facchin 2017-06-26 09:35:39 +02:00
parent 506ebd8011
commit 76f4668f02

View File

@ -761,6 +761,7 @@ public class Editor extends JFrame implements RunnerListener {
portMenu = new JMenu(tr("Port"));
populatePortMenu();
toolsMenu.add(portMenu);
MenuScroller.setScrollerFor(portMenu);
item = new JMenuItem(tr("Get Board Info"));
item.addActionListener(e -> handleBoardInfo());
toolsMenu.add(item);
@ -1108,9 +1109,6 @@ public class Editor extends JFrame implements RunnerListener {
}
portMenu.setEnabled(portMenu.getMenuComponentCount() > 0);
if (portMenu.getMenuComponentCount() > 0) {
MenuScroller.setScrollerFor(portMenu);
}
}