Changeset 1397 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2009-02-14T12:25:54+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r1169 r1397 31 31 import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor; 32 32 import org.openstreetmap.josm.data.osm.visitor.NameVisitor; 33 import org.openstreetmap.josm.gui.ExtendedDialog; 33 34 import org.openstreetmap.josm.tools.DontShowAgainInfo; 34 35 import org.openstreetmap.josm.tools.ImageProvider; … … 154 155 } 155 156 if (role.length() > 0) { 156 return JOptionPane.showConfirmDialog(Main.parent, tr( 157 "Selection \"{0}\" is used by relation \"{1}\" with role {2}.\nDelete from relation?", s.name, 158 n.name, role), tr("Conflicting relation"), JOptionPane.YES_NO_OPTION); 157 return new ExtendedDialog(Main.parent, 158 tr("Conflicting relation"), 159 tr("Selection \"{0}\" is used by relation \"{1}\" with role {2}.\nDelete from relation?", 160 s.name, n.name, role), 161 new String[] {tr("Delete from relation"), tr("Cancel")}, 162 new String[] {"dialogs/delete.png", "cancel.png"}).getValue(); 159 163 } else { 160 return JOptionPane.showConfirmDialog(Main.parent, tr( 161 "Selection \"{0}\" is used by relation \"{1}\".\nDelete from relation?", s.name, n.name), 162 tr("Conflicting relation"), JOptionPane.YES_NO_OPTION); 164 return new ExtendedDialog(Main.parent, 165 tr("Conflicting relation"), 166 tr("Selection \"{0}\" is used by relation \"{1}\".\nDelete from relation?", 167 s.name, n.name), 168 new String[] {tr("Delete from relation"), tr("Cancel")}, 169 new String[] {"dialogs/delete.png", "cancel.png"}).getValue(); 163 170 } 164 171 } … … 208 215 waysToBeChanged.add((Way) ref); 209 216 } else if (ref instanceof Relation) { 210 if (testRelation((Relation) ref, osm) == JOptionPane.YES_OPTION) {217 if (testRelation((Relation) ref, osm) == 1) { 211 218 Collection<OsmPrimitive> relset = relationsToBeChanged.get(ref); 212 219 if (relset == null) … … 248 255 } 249 256 if (!found) { 250 if (testRelation((Relation) ref, w) == JOptionPane.YES_OPTION) {257 if (testRelation((Relation) ref, w) == 1) { 251 258 relset.add(w); 252 259 relationsToBeChanged.put(ref, relset);
Note:
See TracChangeset
for help on using the changeset viewer.