Changeset 6964 in josm for trunk/src


Ignore:
Timestamp:
2014-04-09T22:48:16+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #9905 - fix EDT violation in merge layer action

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r6706 r6964  
    4545            public void run() {
    4646                boolean layerMerged = false;
    47                 for (Layer sourceLayer: sourceLayers) {
     47                for (final Layer sourceLayer: sourceLayers) {
    4848                    if (sourceLayer != null && sourceLayer != targetLayer) {
    4949                        if (sourceLayer instanceof OsmDataLayer && targetLayer instanceof OsmDataLayer
     
    5454                        }
    5555                        targetLayer.mergeFrom(sourceLayer);
    56                         Main.main.removeLayer(sourceLayer);
     56                        GuiHelper.runInEDTAndWait(new Runnable() {
     57                            @Override
     58                            public void run() {
     59                                Main.main.removeLayer(sourceLayer);
     60                            }
     61                        });
    5762                        layerMerged = true;
    5863                    }
Note: See TracChangeset for help on using the changeset viewer.