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:
parent
506ebd8011
commit
76f4668f02
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user