Ignore:
Timestamp:
2018-09-13T22:48:54+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16730 - make sure we try to display popup menus only if their parent is visible on screen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuButton.java

    r13076 r14248  
    144144     */
    145145    public void setPopupMenu(JPopupMenu m) {
    146         this.menu = m;
     146        menu = m;
    147147    }
    148148
    149149    @Override
    150150    public void actionPerformed(ActionEvent e) {
    151         this.menu.show(this, 0, this.getHeight());
     151        if (isShowing()) {
     152            menu.show(this, 0, this.getHeight());
     153        }
    152154    }
    153155
Note: See TracChangeset for help on using the changeset viewer.