Changeset 12767 in josm for trunk/src


Ignore:
Timestamp:
2017-09-07T01:05:36+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15229 - see #15182 - do not longer fire ChangesetCacheEvent in EDT - now up to listeners to run their code in it if required

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

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

    r12747 r12767  
    1616import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
    1717import org.openstreetmap.josm.data.UserIdentityManager;
    18 import org.openstreetmap.josm.gui.util.GuiHelper;
    1918import org.openstreetmap.josm.tools.SubclassFilteredCollection;
    2019
     
    3231 * clears itself if the OSM API URL is changed in the preferences.
    3332 *
    34  * {@link ChangesetCacheEvent}s are delivered on the EDT.
    35  *
    3633 */
    3734public final class ChangesetCache implements PreferenceChangedListener {
     
    8077
    8178    private void fireChangesetCacheEvent(final ChangesetCacheEvent e) {
    82         GuiHelper.runInEDT(() -> {
    83             for (ChangesetCacheListener l: listeners) {
    84                 l.changesetCacheUpdated(e);
    85             }
    86         });
     79        for (ChangesetCacheListener l: listeners) {
     80            l.changesetCacheUpdated(e);
     81        }
    8782    }
    8883
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java

    r12495 r12767  
    198198            }
    199199        }
    200         sort();
    201         fireTableDataChanged();
    202         setSelectedChangesets(selected);
     200        GuiHelper.runInEDT(() -> {
     201            sort();
     202            fireTableDataChanged();
     203            setSelectedChangesets(selected);
     204        });
    203205    }
    204206}
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java

    r12372 r12767  
    1919import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2020import org.openstreetmap.josm.data.osm.Storage;
     21import org.openstreetmap.josm.gui.util.GuiHelper;
    2122
    2223/**
     
    228229            }
    229230        }
    230         fireContentsChanged(this, 0, getSize());
    231         setSelectedChangesets(sel);
     231        GuiHelper.runInEDT(() -> {
     232            fireContentsChanged(this, 0, getSize());
     233            setSelectedChangesets(sel);
     234        });
    232235    }
    233236}
  • trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java

    r9519 r12767  
    1111import org.openstreetmap.josm.data.osm.ChangesetCacheEvent;
    1212import org.openstreetmap.josm.data.osm.ChangesetCacheListener;
     13import org.openstreetmap.josm.gui.util.GuiHelper;
    1314
    1415/**
     
    6768    @Override
    6869    public void changesetCacheUpdated(ChangesetCacheEvent event) {
    69         refresh();
     70        GuiHelper.runInEDT(this::refresh);
    7071    }
    7172
  • trunk/src/org/openstreetmap/josm/io/MessageNotifier.java

    r12766 r12767  
    3535    /**
    3636     * Called when new new messages are detected.
    37      * @since xxx
     37     * @since 12766
    3838     */
    3939    @FunctionalInterface
Note: See TracChangeset for help on using the changeset viewer.