Changeset 26952 in osm for applications/editors/josm


Ignore:
Timestamp:
2011-10-23T17:13:30+02:00 (13 years ago)
Author:
zverik
Message:

small buxfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/SplittingMultipolygons.java

    r26919 r26952  
    3636        }
    3737       
    38         /* Process all segments, no matter which
    39         for( Way segment : arcs ) {
    40             boolean found = false;
    41             for( Way ring : rings )
    42                 if( ring.containsNode(segment.firstNode()) && ring.containsNode(segment.lastNode())
    43                         && !segmentInsidePolygon(segment.getNode(0), segment.getNode(1), ring.getNodes()) )
    44                     found = true;
    45             if( !found )
    46                 return false;
    47         }*/
     38        // If there are more that one segment, check that they touch rings
     39        if( arcs.size() > 1 ) {
     40            for( Way segment : arcs ) {
     41                boolean found = false;
     42                for( Way ring : rings )
     43                    if( ring.containsNode(segment.firstNode()) && ring.containsNode(segment.lastNode()) )
     44                        found = true;
     45                if( !found )
     46                    return false;
     47            }
     48        }
    4849
    4950        if( rings.isEmpty() && arcs.isEmpty() )
Note: See TracChangeset for help on using the changeset viewer.