Changeset 12275 in josm


Ignore:
Timestamp:
2017-05-29T16:19:58+02:00 (2 years ago)
Author:
Don-vip
Message:

see #14847 - optimization during gpx parsing: don't construct change event objects each time a track is added if there is no listener yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java

    r12267 r12275  
    663663
    664664    private void fireInvalidate() {
    665         GpxDataChangeEvent e = new GpxDataChangeEvent(this);
    666         listeners.fireEvent(l -> l.gpxDataChanged(e));
     665        if (listeners.hasListeners()) {
     666            GpxDataChangeEvent e = new GpxDataChangeEvent(this);
     667            listeners.fireEvent(l -> l.gpxDataChanged(e));
     668        }
    667669    }
    668670
Note: See TracChangeset for help on using the changeset viewer.