Changeset 14627 in josm for trunk/src


Ignore:
Timestamp:
2019-01-03T13:47:12+01:00 (5 years ago)
Author:
GerdP
Message:

fix #17167 : Regression from #17119 clipped closed path was not closed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java

    r14615 r14627  
    4747            if (num > 0 && (type == PathIterator.SEG_CLOSE || type == PathIterator.SEG_MOVETO || pit.isDone())) {
    4848                // we have extracted a single segment, maybe unclosed
    49                 hasData |= addToResult(result, points, num,
     49                boolean hasPath = addToResult(result, points, num,
    5050                        new Rectangle2D.Double(minX, minY, maxX - minX, maxY - minY), clippingRect);
     51                hasData |= hasPath;
     52                if (hasPath && type == PathIterator.SEG_CLOSE) {
     53                    result.closePath();
     54                }
    5155                num = 0;
    5256                minX = minY = Double.POSITIVE_INFINITY;
Note: See TracChangeset for help on using the changeset viewer.