Changeset 15617 in josm


Ignore:
Timestamp:
2019-12-26T08:59:06+01:00 (3 months ago)
Author:
GerdP
Message:

fix #18083: Combine way: No warning about data outside of download area
Ignore ways with nodes outside download area so that action is disabled when the selection doesn't contain enough "good" ways.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java

    r15574 r15617  
    117117        ways = new LinkedHashSet<>(ways);
    118118        // remove incomplete ways
    119         ways.removeIf(OsmPrimitive::isIncomplete);
     119        ways.removeIf(w -> w.isIncomplete() || w.isOutsideDownloadArea());
    120120        // we need at least two ways
    121121        if (ways.size() < 2)
     
    326326        if (OsmUtils.isOsmCollectionEditable(selection)) {
    327327            for (OsmPrimitive osm : selection) {
    328                 if (osm instanceof Way && !osm.isIncomplete() && ++numWays >= 2) {
     328                if (osm instanceof Way && !osm.isIncomplete() && !((Way) osm).isOutsideDownloadArea()
     329                        && ++numWays >= 2) {
    329330                    break;
    330331                }
Note: See TracChangeset for help on using the changeset viewer.