Ignore:
Timestamp:
2016-08-17T20:14:58+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13306 - Make map paint code use double coordinates (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

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

    r10601 r10827  
    4242import org.openstreetmap.josm.gui.MapFrame;
    4343import org.openstreetmap.josm.gui.MapView;
     44import org.openstreetmap.josm.gui.MapViewState.MapViewPoint;
    4445import org.openstreetmap.josm.gui.SelectionManager;
    4546import org.openstreetmap.josm.gui.SelectionManager.SelectionEnded;
     
    11921193                    wnp.a = w.getNode(ws.lowerIndex);
    11931194                    wnp.b = w.getNode(ws.lowerIndex + 1);
    1194                     Point2D p1 = mv.getPoint2D(wnp.a);
    1195                     Point2D p2 = mv.getPoint2D(wnp.b);
     1195                    MapViewPoint p1 = mv.getState().getPointFor(wnp.a);
     1196                    MapViewPoint p2 = mv.getState().getPointFor(wnp.b);
    11961197                    if (WireframeMapRenderer.isLargeSegment(p1, p2, virtualSpace)) {
    1197                         Point2D pc = new Point2D.Double((p1.getX() + p2.getX()) / 2, (p1.getY() + p2.getY()) / 2);
     1198                        Point2D pc = new Point2D.Double((p1.getInViewX() + p2.getInViewX()) / 2, (p1.getInViewY() + p2.getInViewY()) / 2);
    11981199                        if (p.distanceSq(pc) < virtualSnapDistSq2) {
    11991200                            // Check that only segments on top of each other get added to the
Note: See TracChangeset for help on using the changeset viewer.