Changeset 12329 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2017-06-07T21:59:05+02:00 (7 years ago)
Author:
michael2402
Message:

See #14854: Selection change listeners should not re-add the primitives that are removed to the selection.

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSelectionListener.java

    r12113 r12329  
    230230                HashSet<OsmPrimitive> currentSet = new LinkedHashSet<>(old);
    231231                currentSet.removeAll(remove);
    232                 current = Collections.unmodifiableSet(currentSet);
     232                current = currentSet;
    233233            }
    234234        }
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r12071 r12329  
    584584    private void removePrimitiveImpl(OsmPrimitive primitive) {
    585585        clearSelection(primitive.getPrimitiveId());
     586        if (primitive.isSelected()) {
     587            throw new DataIntegrityProblemException("Primitive was re-selected by a selection listener: " + primitive);
     588        }
    586589        super.removePrimitive(primitive);
    587590        allPrimitives.remove(primitive);
Note: See TracChangeset for help on using the changeset viewer.