Changeset 15127 in josm


Ignore:
Timestamp:
2019-05-28T01:43:47+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #17724 - Allow DataSet merges without merging the Bounds (patch by taylor.smock)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r14922 r15127  
    406406     */
    407407    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 15127
     420     */
     421    public void merge(ProgressMonitor progressMonitor, boolean mergeBounds) {
    408422        if (sourceDataSet == null)
    409423            return;
     
    443457            // copy the merged layer's data source info.
    444458            // 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                    }
    448464                }
    449465            }
Note: See TracChangeset for help on using the changeset viewer.