Skip to content

Commit

Permalink
Call setScrollerFor port menu only once
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm committed Jun 26, 2017
1 parent 506ebd8 commit 76f4668
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/src/processing/app/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ public void actionPerformed(ActionEvent e) {
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);
Expand Down Expand Up @@ -1108,9 +1109,6 @@ public int compare(BoardPort o1, BoardPort o2) {
}

portMenu.setEnabled(portMenu.getMenuComponentCount() > 0);
if (portMenu.getMenuComponentCount() > 0) {
MenuScroller.setScrollerFor(portMenu);
}
}


Expand Down

0 comments on commit 76f4668

Please sign in to comment.