Ticket #17724: 17724.patch
File 17724.patch, 1.7 KB (added by , 5 years ago) |
---|
-
src/org/openstreetmap/josm/data/osm/DataSetMerger.java
405 405 * @param progressMonitor The progress monitor 406 406 */ 407 407 public void merge(ProgressMonitor progressMonitor) { 408 merge(progressMonitor, true); 409 } 410 411 /** 412 * Runs the merge operation. Successfully merged {@link OsmPrimitive}s are in 413 * {@link #getTargetDataSet()}. 414 * 415 * See {@link #getConflicts()} for a map of conflicts after the merge operation. 416 * @param progressMonitor The progress monitor 417 * @param mergeBounds Whether or not to merge the bounds of the new DataSet to 418 * the existing DataSet 419 * @since xxx 420 */ 421 public void merge(ProgressMonitor progressMonitor, boolean mergeBounds) { 408 422 if (sourceDataSet == null) 409 423 return; 410 424 if (progressMonitor != null) { … … 442 456 443 457 // copy the merged layer's data source info. 444 458 // only add source rectangles if they are not contained in the layer already. 445 for (DataSource src : sourceDataSet.getDataSources()) { 446 if (a == null || !a.contains(src.bounds.asRect())) { 447 targetDataSet.addDataSource(src); 459 if (mergeBounds) { 460 for (DataSource src : sourceDataSet.getDataSources()) { 461 if (a == null || !a.contains(src.bounds.asRect())) { 462 targetDataSet.addDataSource(src); 463 } 448 464 } 449 465 } 450 466