Changeset 13462 in josm


Ignore:
Timestamp:
2018-02-25T21:04:58+01:00 (4 months ago)
Author:
Don-vip
Message:

fix #15847 - fires OsmDataLayer property change events in EDT to avoid deadlock in AutoSaveTask

File:
1 edited

Legend:

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

    r13453 r13462  
    206206        requiresSaveToFile = newValue;
    207207        if (oldValue != newValue) {
    208             propertyChangeSupport.firePropertyChange(REQUIRES_SAVE_TO_DISK_PROP, oldValue, newValue);
     208            GuiHelper.runInEDT(() ->
     209                propertyChangeSupport.firePropertyChange(REQUIRES_SAVE_TO_DISK_PROP, oldValue, newValue)
     210            );
    209211        }
    210212    }
     
    214216        requiresUploadToServer = newValue;
    215217        if (oldValue != newValue) {
    216             propertyChangeSupport.firePropertyChange(REQUIRES_UPLOAD_TO_SERVER_PROP, oldValue, newValue);
     218            GuiHelper.runInEDT(() ->
     219                propertyChangeSupport.firePropertyChange(REQUIRES_UPLOAD_TO_SERVER_PROP, oldValue, newValue)
     220            );
    217221        }
    218222    }
Note: See TracChangeset for help on using the changeset viewer.