Changeset 8368 in josm


Ignore:
Timestamp:
2015-05-16T23:18:38+02:00 (10 years ago)
Author:
Don-vip
Message:

avoid deadlock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r8367 r8368  
    598598         * @param selection the collection of currently selected OSM objects
    599599         */
    600         public synchronized void setJOSMSelection(final Collection<? extends OsmPrimitive> selection) {
    601             this.selection.clear();
    602             if (selection != null) {
    603                 this.selection.addAll(selection);
    604                 sort();
     600        public void setJOSMSelection(final Collection<? extends OsmPrimitive> selection) {
     601            synchronized (this) {
     602                this.selection.clear();
     603                if (selection != null) {
     604                    this.selection.addAll(selection);
     605                    sort();
     606                }
    605607            }
    606608            GuiHelper.runInEDTAndWait(new Runnable() {
Note: See TracChangeset for help on using the changeset viewer.