Ignore:
Timestamp:
2009-02-14T12:25:54+01:00 (15 years ago)
Author:
stoecker
Message:

apply patches from xeen for #1977.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r1169 r1397  
    3131import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor;
    3232import org.openstreetmap.josm.data.osm.visitor.NameVisitor;
     33import org.openstreetmap.josm.gui.ExtendedDialog;
    3334import org.openstreetmap.josm.tools.DontShowAgainInfo;
    3435import org.openstreetmap.josm.tools.ImageProvider;
     
    154155        }
    155156        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(); 
    159163        } 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(); 
    163170        }
    164171    }
     
    208215                    waysToBeChanged.add((Way) ref);
    209216                } else if (ref instanceof Relation) {
    210                     if (testRelation((Relation) ref, osm) == JOptionPane.YES_OPTION) {
     217                    if (testRelation((Relation) ref, osm) == 1) {
    211218                        Collection<OsmPrimitive> relset = relationsToBeChanged.get(ref);
    212219                        if (relset == null)
     
    248255                        }
    249256                        if (!found) {
    250                             if (testRelation((Relation) ref, w) == JOptionPane.YES_OPTION) {
     257                            if (testRelation((Relation) ref, w) == 1) {
    251258                                relset.add(w);
    252259                                relationsToBeChanged.put(ref, relset);
Note: See TracChangeset for help on using the changeset viewer.