Ignore:
Timestamp:
2015-08-22T21:43:53+02:00 (9 years ago)
Author:
simon04
Message:

fix #11790 - Validator dialog: lookup test errors for selected primitives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r8633 r8682  
    7777    /** The select button */
    7878    private SideButton selectButton;
     79    /** The lookup button */
     80    private SideButton lookupButton;
    7981
    8082    private final JPopupMenu popupMenu = new JPopupMenu();
     
    114116        selectButton.setEnabled(false);
    115117        buttons.add(selectButton);
     118
     119        lookupButton = new SideButton(new AbstractAction() {
     120            {
     121                putValue(NAME, tr("Lookup"));
     122                putValue(SHORT_DESCRIPTION, tr("Looks up the the selected primitives in the error list."));
     123                putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));
     124            }
     125
     126            @Override
     127            public void actionPerformed(ActionEvent e) {
     128                final DataSet ds = Main.main.getCurrentDataSet();
     129                if (ds == null) {
     130                    return;
     131                }
     132                tree.selectRelatedErrors(ds.getSelected());
     133            }
     134        });
     135
     136        buttons.add(lookupButton);
    116137
    117138        buttons.add(new SideButton(Main.main.validator.validateAction));
Note: See TracChangeset for help on using the changeset viewer.