Changeset 14912 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-03-21T08:58:02+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r14894 r14912 31 31 import org.openstreetmap.josm.actions.AbstractSelectAction; 32 32 import org.openstreetmap.josm.actions.AutoScaleAction; 33 import org.openstreetmap.josm.actions.JosmAction; 33 34 import org.openstreetmap.josm.actions.ValidateAction; 34 35 import org.openstreetmap.josm.actions.relation.EditRelationAction; … … 86 87 87 88 /** The display tree */ 88 public ValidatorTreePanel tree;89 public final ValidatorTreePanel tree; 89 90 90 91 /** The validate action */ … … 117 118 KeyEvent.VK_V, Shortcut.ALT_SHIFT), 150, false, ValidatorPreference.class); 118 119 119 Action removeProblemAction = new AbstractAction() {120 {121 putValue(NAME, tr("Ignore for now"));122 putValue(SHORT_DESCRIPTION, tr("Ignore and remove from tree."));123 new ImageProvider("dialogs", "delete").getResource().attachImageIcon(this, true);124 }125 126 @Override127 public void actionPerformed(ActionEvent e) {128 TestError error = getSelectedError();129 error.setIgnored(true);130 tree.resetErrors();131 }132 };133 134 popupMenuHandler.addAction(MainApplication.getMenu().autoScaleActions.get("problem"));135 popupMenuHandler.addAction(new EditRelationAction());136 popupMenuHandler.addAction(removeProblemAction);137 138 120 tree = new ValidatorTreePanel(); 139 121 tree.addMouseListener(new MouseEventHandler()); 140 122 addTreeSelectionListener(new SelectionWatch()); 141 123 InputMapUtils.unassignCtrlShiftUpDown(tree, JComponent.WHEN_FOCUSED); 124 125 JosmAction ignoreForNowAction = new JosmAction(tr("Ignore for now"), "dialogs/delete", 126 tr("Ignore and remove from tree."), Shortcut.registerShortcut("tools:validate:ignore-for-now", 127 tr("Ignore and remove from tree."), KeyEvent.VK_MINUS, Shortcut.SHIFT), 128 false, false) { 129 130 @Override 131 public void actionPerformed(ActionEvent e) { 132 TestError error = getSelectedError(); 133 if (error != null) { 134 error.setIgnored(true); 135 tree.resetErrors(); 136 invalidateValidatorLayers(); 137 } 138 } 139 }; 140 141 popupMenuHandler.addAction(MainApplication.getMenu().autoScaleActions.get("problem")); 142 popupMenuHandler.addAction(new EditRelationAction()); 143 popupMenuHandler.addAction(ignoreForNowAction); 142 144 143 145 List<SideButton> buttons = new LinkedList<>();
Note:
See TracChangeset
for help on using the changeset viewer.