Ticket #17469: 17469-shortcut.patch
| File 17469-shortcut.patch, 2.0 KB (added by , 7 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
30 30 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; 35 36 import org.openstreetmap.josm.command.Command; … … 116 117 Shortcut.registerShortcut("subwindow:validator", tr("Toggle: {0}", tr("Validation Results")), 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 } 120 JosmAction removeProblemAction = new JosmAction( 121 tr("Ignore for now"), 122 "dialogs/delete", 123 tr("Ignore and remove from tree."), 124 Shortcut.registerShortcut("tools:validate:ignore-for-now", 125 tr("Ignore and remove from tree."), 126 KeyEvent.VK_I, Shortcut.CTRL_SHIFT), 127 false, false) { 125 128 126 129 @Override 127 130 public void actionPerformed(ActionEvent e) { 128 131 TestError error = getSelectedError(); 129 error.setIgnored(true); 130 tree.resetErrors(); 132 if (error != null) { 133 error.setIgnored(true); 134 tree.resetErrors(); 135 invalidateValidatorLayers(); 136 } 131 137 } 132 138 }; 133 139
