File tree 1 file changed +4
-2
lines changed
app/src/processing/app/tools
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ public class MenuScroller {
34
34
35
35
private JPopupMenu menu ;
36
36
private Component [] menuItems ;
37
+ private Component [] allMenuItems ;
37
38
private MenuScrollItem upItem ;
38
39
private MenuScrollItem downItem ;
39
40
private final MenuScrollListener menuListener = new MenuScrollListener ();
@@ -540,7 +541,8 @@ public void popupMenuCanceled(PopupMenuEvent e) {
540
541
}
541
542
542
543
private void setMenuItems () {
543
- menuItems = Arrays .stream (menu .getComponents ()).filter (x -> x .isVisible ()).toArray (Component []::new );
544
+ allMenuItems = menu .getComponents ();
545
+ menuItems = Arrays .stream (allMenuItems ).filter (x -> x .isVisible ()).toArray (Component []::new );
544
546
if (keepVisibleIndex >= topFixedCount
545
547
&& keepVisibleIndex <= menuItems .length - bottomFixedCount
546
548
&& (keepVisibleIndex > firstIndex + scrollCount
@@ -555,7 +557,7 @@ private void setMenuItems() {
555
557
556
558
private void restoreMenuItems () {
557
559
menu .removeAll ();
558
- for (Component component : menuItems ) {
560
+ for (Component component : allMenuItems ) {
559
561
menu .add (component );
560
562
}
561
563
}
You can’t perform that action at this time.
0 commit comments