&& ((OsmDataLayer)sourceLayer).isUploadDiscouraged() != ((OsmDataLayer)targetLayer).isUploadDiscouraged()) {
if (warnMergingUploadDiscouragedLayers(sourceLayer, targetLayer)) {
break;
}
}
targetLayer.mergeFrom(sourceLayer);
GuiHelper.runInEDTAndWait(new Runnable() {
@Override
public void run() {
Main.main.removeLayer(sourceLayer);
}