Changeset 35758 in osm for applications/editors/josm


Ignore:
Timestamp:
2021-05-17T20:48:06+02:00 (4 years ago)
Author:
taylor.smock
Message:

cadastre-fr: recompile for compatibility with JOSM r17896

Location:
applications/editors/josm/plugins/cadastre-fr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/build.xml

    r35748 r35758  
    22<project name="cadastre-fr" default="dist" basedir=".">
    33    <!-- enter the SVN commit message -->
    4     <property name="commit.message" value="recompile for compatibility with JOSM r17867"/>
     4    <property name="commit.message" value="recompile for compatibility with JOSM r17896"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="17867"/>
     6    <property name="plugin.main.version" value="17896"/>
    77   
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/actions/mapmode/Address.java

    r35539 r35758  
    5151import org.openstreetmap.josm.data.coor.EastNorth;
    5252import org.openstreetmap.josm.data.osm.DataSet;
     53import org.openstreetmap.josm.data.osm.IWaySegment;
    5354import org.openstreetmap.josm.data.osm.Node;
    5455import org.openstreetmap.josm.data.osm.OsmDataManager;
     
    190191        } else {
    191192            List<WaySegment> wss = mv.getNearestWaySegments(mousePos, OsmPrimitive::isSelectable);
    192             for (WaySegment ws : wss) {
    193                 if (ws.way.get(tagHighway) != null && ws.way.get(tagHighwayName) != null)
    194                     mouseOnExistingWays.add(ws.way);
    195                 else if (ws.way.get(tagBuilding) != null && ws.way.get(tagHouseNumber) == null)
    196                     mouseOnExistingBuildingWays.add(ws.way);
     193            for (IWaySegment<Node, Way> ws : wss) {
     194                if (ws.getWay().get(tagHighway) != null && ws.getWay().get(tagHighwayName) != null)
     195                    mouseOnExistingWays.add(ws.getWay());
     196                else if (ws.getWay().get(tagBuilding) != null && ws.getWay().get(tagHouseNumber) == null)
     197                    mouseOnExistingBuildingWays.add(ws.getWay());
    197198            }
    198199            if (mouseOnExistingWays.size() == 1) {
     
    310311        List<WaySegment> wss = MainApplication.getMap().mapView.getNearestWaySegments(e.getPoint(), OsmPrimitive::isSelectable);
    311312        Map<Way, List<Integer>> insertPoints = new HashMap<>();
    312         for (WaySegment ws : wss) {
     313        for (IWaySegment<Node, Way> ws : wss) {
    313314            List<Integer> is;
    314             if (insertPoints.containsKey(ws.way)) {
    315                 is = insertPoints.get(ws.way);
     315            if (insertPoints.containsKey(ws.getWay())) {
     316                is = insertPoints.get(ws.getWay());
    316317            } else {
    317318                is = new ArrayList<>();
    318                 insertPoints.put(ws.way, is);
    319             }
    320 
    321             is.add(ws.lowerIndex);
     319                insertPoints.put(ws.getWay(), is);
     320            }
     321
     322            is.add(ws.getLowerIndex());
    322323        }
    323324        Set<Pair<Node, Node>> segSet = new HashSet<>();
Note: See TracChangeset for help on using the changeset viewer.