Changeset 2315 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2009-10-25T13:58:47+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r2273 r2315 5 5 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.completeTagCollectionForEditing; 6 6 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.normalizeTagCollectionBeforeEditing; 7 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 7 8 import static org.openstreetmap.josm.tools.I18n.tr; 8 9 … … 29 30 import org.openstreetmap.josm.data.osm.Way; 30 31 import org.openstreetmap.josm.data.osm.BackreferencedDataSet.RelationToChildReference; 32 import org.openstreetmap.josm.gui.DefaultNameFormatter; 33 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 34 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; 31 35 import org.openstreetmap.josm.gui.conflict.tags.CombinePrimitiveResolverDialog; 32 36 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 37 import org.openstreetmap.josm.tools.ImageProvider; 33 38 import org.openstreetmap.josm.tools.Shortcut; 34 35 36 39 /** 37 40 * Merges a collection of nodes into one node. … … 161 164 waysToDelete.add(w); 162 165 } else { 163 JOptionPane.showMessageDialog( 166 ButtonSpec[] options = new ButtonSpec[] { 167 new ButtonSpec( 168 tr("Abort Merging"), 169 ImageProvider.get("cancel"), 170 tr("Click to abort merging nodes"), 171 null /* no special help topic */ 172 ) 173 }; 174 HelpAwareOptionPane.showOptionDialog( 164 175 Main.parent, 165 tr("Cannot merge nodes: " + 166 "Would have to delete a way that is still used."), 176 tr( 177 "Cannot merge nodes: Would have to delete way ''{0}'' which is still used.", 178 w.getDisplayName(DefaultNameFormatter.getInstance()) 179 ), 167 180 tr("Warning"), 168 JOptionPane.WARNING_MESSAGE 181 JOptionPane.WARNING_MESSAGE, 182 null, /* no icon */ 183 options, 184 options[0], 185 ht("/Action/MergeNodes#WaysToDeleteStillInUse") 169 186 ); 170 187 return null; … … 178 195 } 179 196 } 197 cmds.add(new DeleteCommand(waysToDelete)); 180 198 return cmds; 181 199 }
Note:
See TracChangeset
for help on using the changeset viewer.
