Changeset 12152 in josm


Ignore:
Timestamp:
2017-05-15T12:54:16+02:00 (6 months ago)
Author:
michael2402
Message:

Do not invalidate inactive data layers on selection change in active layer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r12116 r12152  
    5151import org.openstreetmap.josm.data.DataSource;
    5252import org.openstreetmap.josm.data.ProjectionBounds;
    53 import org.openstreetmap.josm.data.SelectionChangedListener;
    5453import org.openstreetmap.josm.data.conflict.Conflict;
    5554import org.openstreetmap.josm.data.conflict.ConflictCollection;
     
    6261import org.openstreetmap.josm.data.gpx.WayPoint;
    6362import org.openstreetmap.josm.data.osm.DataIntegrityProblemException;
     63import org.openstreetmap.josm.data.osm.DataSelectionListener;
    6464import org.openstreetmap.josm.data.osm.DataSet;
    6565import org.openstreetmap.josm.data.osm.DataSet.UploadPolicy;
     
    118118 * @since 17
    119119 */
    120 public class OsmDataLayer extends AbstractModifiableLayer implements Listener, SelectionChangedListener, HighlightUpdateListener {
     120public class OsmDataLayer extends AbstractModifiableLayer implements Listener, DataSelectionListener, HighlightUpdateListener {
    121121    private static final int HATCHED_SIZE = 15;
    122122    /** Property used to know if this layer has to be saved on disk */
     
    406406        data.addDataSetListener(MultipolygonCache.getInstance());
    407407        data.addHighlightUpdateListener(this);
    408         DataSet.addSelectionListener(this);
     408        data.addSelectionListener(this);
    409409        if (name != null && name.startsWith(createLayerName("")) && Character.isDigit(
    410410                (name.substring(createLayerName("").length()) + "XX" /*avoid StringIndexOutOfBoundsException*/).charAt(1))) {
     
    986986    public synchronized void destroy() {
    987987        super.destroy();
    988         DataSet.removeSelectionListener(this);
     988        data.removeSelectionListener(this);
    989989        data.removeHighlightUpdateListener(this);
    990990    }
     
    998998
    999999    @Override
    1000     public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
     1000    public void selectionChanged(SelectionChangeEvent event) {
    10011001        invalidate();
    10021002    }
Note: See TracChangeset for help on using the changeset viewer.