Skip to content

Commit 76f4668

Browse files
committed
Call setScrollerFor port menu only once
1 parent 506ebd8 commit 76f4668

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/src/processing/app/Editor.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ public void actionPerformed(ActionEvent e) {
761761
portMenu = new JMenu(tr("Port"));
762762
populatePortMenu();
763763
toolsMenu.add(portMenu);
764+
MenuScroller.setScrollerFor(portMenu);
764765
item = new JMenuItem(tr("Get Board Info"));
765766
item.addActionListener(e -> handleBoardInfo());
766767
toolsMenu.add(item);
@@ -1108,9 +1109,6 @@ public int compare(BoardPort o1, BoardPort o2) {
11081109
}
11091110

11101111
portMenu.setEnabled(portMenu.getMenuComponentCount() > 0);
1111-
if (portMenu.getMenuComponentCount() > 0) {
1112-
MenuScroller.setScrollerFor(portMenu);
1113-
}
11141112
}
11151113

11161114

0 commit comments

Comments
 (0)