Changeset 13229 in josm


Ignore:
Timestamp:
2017-12-23T00:33:34+01:00 (4 months ago)
Author:
Don-vip
Message:

fix #15688 - do not filter selected way nodes in draw mode

File:
1 edited

Legend:

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

    r13225 r13229  
    13131313    public Collection<? extends OsmPrimitive> getPreservedPrimitives() {
    13141314        DataSet ds = getLayerManager().getEditDataSet();
    1315         return ds != null ? ds.getSelected() : Collections.emptySet();
     1315        if (ds != null) {
     1316            // Preserves selected primitives and selected way nodes
     1317            Set<OsmPrimitive> result = new HashSet<>();
     1318            for (Way w : ds.getSelectedWays()) {
     1319                result.addAll(w.getNodes());
     1320            }
     1321            result.addAll(ds.getSelected());
     1322            return result;
     1323        }
     1324        return Collections.emptySet();
    13161325    }
    13171326
Note: See TracChangeset for help on using the changeset viewer.