Ignore:
Timestamp:
2016-10-18T13:04:35+02:00 (3 years ago)
Author:
michael2402
Message:

Fix #13793: Clip paths in a way that let's the dashes stay in place.

Location:
trunk/src/org/openstreetmap/josm/actions/mapmode
Files:
2 edited

Legend:

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

    r11082 r11144  
    233233            // Non-native highlighting is used, because sometimes highlighted
    234234            // segments are covered with others, which is bad.
    235             g.setStroke(SELECT_TARGET_WAY_STROKE.get());
     235            BasicStroke stroke = SELECT_TARGET_WAY_STROKE.get();
     236            g.setStroke(stroke);
    236237
    237238            List<Node> nodes = targetWay.getNodes();
    238239
    239             g.draw(new MapViewPath(mv).append(nodes, false));
     240            g.draw(new MapViewPath(mv).append(nodes, false).computeClippedLine(stroke));
    240241
    241242        } else if (state == State.IMPROVING) {
     
    301302                }
    302303            }
    303             g.draw(b);
     304            g.draw(b.computeClippedLine(g.getStroke()));
    304305
    305306            // Highlighting candidateNode
     
    313314                drawIntersectingWayHelperLines(mv, b);
    314315                g.setStroke(MOVE_NODE_INTERSECTING_STROKE.get());
    315                 g.draw(b);
     316                g.draw(b.computeClippedLine(g.getStroke()));
    316317            }
    317318
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java

    r10875 r11144  
    471471            line.moveTo(referenceSegment.getFirstNode());
    472472            line.lineTo(referenceSegment.getSecondNode());
    473             g.draw(line);
     473            g.draw(line.computeClippedLine(g.getStroke()));
    474474
    475475            g.setStroke(HELPER_LINE_STROKE.get());
     
    478478            line.moveTo(helperLineStart);
    479479            line.lineTo(helperLineEnd);
    480             g.draw(line);
     480            g.draw(line.computeClippedLine(g.getStroke()));
    481481        }
    482482    }
Note: See TracChangeset for help on using the changeset viewer.