Changeset 35597 in osm


Ignore:
Timestamp:
2020-10-18T09:07:34+02:00 (3 days ago)
Author:
GerdP
Message:

fix #19950: Improve Replace Geometry error message

  • Use again "Please select one way that exists in the database and one new way with correct geometry." when both ways are old
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java

    r35436 r35597  
    235235        Way subjectWay = selection.get(1 - idxNew);
    236236
    237         if (!overrideNewCheck && (subjectWay.isNew() || !referenceWay.isNew())) {
    238             throw new ReplaceGeometryException(
    239                     tr("Both ways are new and have new nodes, cannot decide which one has the correct geometry."));
     237        String msg = null;
     238        if (!subjectWay.isNew() && !referenceWay.isNew()) {
     239            msg = tr("Please select one way that exists in the database and one new way with correct geometry.");
     240        } else if (!overrideNewCheck && (subjectWay.isNew() || !referenceWay.isNew())) {
     241            msg = tr("Both ways are new and have new nodes, cannot decide which one has the correct geometry.");
     242        }
     243        if (msg != null) {
     244            throw new ReplaceGeometryException(msg);
    240245        }
    241246        return buildReplaceWayCommand(subjectWay, referenceWay);
Note: See TracChangeset for help on using the changeset viewer.