Changeset 14688 in josm


Ignore:
Timestamp:
2019-01-13T10:59:30+01:00 (6 years ago)
Author:
GerdP
Message:

see #17201 improve progressMonitor for internal osm (xml) importer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/AbstractReader.java

    r14687 r14688  
    291291        CheckParameterUtil.ensureParameterNotNull(source, "source");
    292292        try {
    293             progressMonitor.beginTask(tr("Prepare OSM data...", 2));
     293            progressMonitor.beginTask(tr("Prepare OSM data..."), 4); // read, prepare, post-process, render
    294294            progressMonitor.indeterminateSubTask(tr("Parsing OSM data..."));
    295295
     
    310310            }
    311311            progressMonitor.worked(1);
    312 
     312            progressMonitor.indeterminateSubTask(tr("Post-processing data set..."));
    313313            // iterate over registered postprocessors and give them each a chance
    314314            // to modify the dataset we have just loaded.
    315315            callPostProcessors(progressMonitor);
     316            progressMonitor.worked(1);
     317            progressMonitor.indeterminateSubTask(tr("Rendering data set..."));
    316318            // Make sure postprocessors did not change the read-only state
    317319            if (readOnly && !getDataSet().isLocked()) {
     
    328330                AbstractPrimitive.advanceUniqueId(minId.getAsLong());
    329331            }
    330             progressMonitor.finishTask();
     332            // don't call progressMonitor.finishTask() here, let caller do it
    331333            progressMonitor.removeCancelListener(cancelListener);
    332334        }
Note: See TracChangeset for help on using the changeset viewer.