Changeset 14889 in josm for trunk


Ignore:
Timestamp:
2019-03-17T12:47:06+01:00 (5 years ago)
Author:
GerdP
Message:

fix #17469: Add action "Remove" to right click menu.
The action removes the corresponding error from the tree. The error is ignored until the validator is executed again.

File:
1 edited

Legend:

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

    r14887 r14889  
    117117                        KeyEvent.VK_V, Shortcut.ALT_SHIFT), 150, false, ValidatorPreference.class);
    118118
     119        Action removeProblemAction = new AbstractAction() {
     120            {
     121                putValue(NAME, tr("Remove"));
     122                putValue(SHORT_DESCRIPTION, tr("Remove from tree."));
     123                new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true);
     124            }
     125
     126            @Override
     127            public void actionPerformed(ActionEvent e) {
     128                TestError error = getSelectedError();
     129                error.setIgnored(true);
     130                tree.resetErrors();
     131            }
     132        };
     133
    119134        popupMenuHandler.addAction(MainApplication.getMenu().autoScaleActions.get("problem"));
    120135        popupMenuHandler.addAction(new EditRelationAction());
     136        popupMenuHandler.addAction(removeProblemAction);
    121137
    122138        tree = new ValidatorTreePanel();
Note: See TracChangeset for help on using the changeset viewer.