Ignore:
Timestamp:
2018-03-17T01:26:16+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #16097 - NPE + disable arrow button in history dialog with changeset button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r13130 r13535  
    6060    private final OpenChangesetDialogAction changesetDialogAction = new OpenChangesetDialogAction(null);
    6161    private final JButton changesetButton = new JButton(changesetDialogAction);
     62    private final BasicArrowButton arrowButton = new BasicArrowButton(BasicArrowButton.SOUTH);
    6263    private JPanel pnlChangesetSource;
    6364    private JPanel pnlChangesetImageryUsed;
     
    114115        changesetButton.setMargin(new Insets(0, 0, 0, 2));
    115116        changesetPanel.add(changesetButton, BorderLayout.CENTER);
    116         final BasicArrowButton arrowButton = new BasicArrowButton(BasicArrowButton.SOUTH);
    117117        arrowButton.addActionListener(action -> {
    118             if (changesetDialogAction != null) { // fix #15444
     118            if (changesetDialogAction.id != null) { // fix #15444, #16097
    119119                final OpenChangesetPopupMenu popupMenu = new OpenChangesetPopupMenu(changesetDialogAction.id);
    120120                popupMenu.insert(changesetDialogAction, 0);
     
    258258            changesetDialogAction.setId(cs.getId());
    259259            changesetButton.setEnabled(true);
     260            arrowButton.setEnabled(true);
    260261
    261262            String username = "";
     
    283284            changesetDialogAction.setId(null);
    284285            changesetButton.setEnabled(false);
     286            arrowButton.setEnabled(false);
    285287        }
    286288
Note: See TracChangeset for help on using the changeset viewer.