Changeset 12274 in josm for trunk/src/org


Ignore:
Timestamp:
2017-05-29T16:12:34+02:00 (7 years ago)
Author:
michael2402
Message:

Fix #14847: Fix reload of colors if data was added to/removed from gpx layer.

File:
1 edited

Legend:

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

    r12175 r12274  
    4040import org.openstreetmap.josm.data.gpx.GpxConstants;
    4141import org.openstreetmap.josm.data.gpx.GpxData;
     42import org.openstreetmap.josm.data.gpx.GpxData.GpxDataChangeEvent;
     43import org.openstreetmap.josm.data.gpx.GpxData.GpxDataChangeListener;
    4244import org.openstreetmap.josm.data.gpx.WayPoint;
    4345import org.openstreetmap.josm.data.preferences.ColorProperty;
     
    5961 * @since 7319
    6062 */
    61 public class GpxDrawHelper implements SoMChangeListener, MapViewPaintable.LayerPainter, PaintableInvalidationListener {
     63public class GpxDrawHelper implements SoMChangeListener, MapViewPaintable.LayerPainter, PaintableInvalidationListener, GpxDataChangeListener {
    6264
    6365    /**
     
    220222        layer = gpxLayer;
    221223        data = gpxLayer.data;
     224        data.addChangeListener(this);
    222225
    223226        layer.addInvalidationListener(this);
     
    14501453     *  callback when data is changed, invalidate cached configuration parameters
    14511454     */
    1452     public void dataChanged() {
     1455    @Override
     1456    public void gpxDataChanged(GpxDataChangeEvent e) {
    14531457        computeCacheInSync = false;
    14541458    }
     
    14841488        SystemOfMeasurement.removeSoMChangeListener(this);
    14851489        layer.removeInvalidationListener(this);
     1490        data.removeChangeListener(this);
    14861491    }
    14871492}
Note: See TracChangeset for help on using the changeset viewer.