Ignore:
Timestamp:
2016-01-02T20:33:42+01:00 (9 years ago)
Author:
simon04
Message:

JOSM/DirectUpload: fix ProgressMonitor usage - see #josm12273

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java

    r31871 r31912  
    222222            tags = tags.replaceAll("[&?/\\\\.;]", " ");
    223223
    224             // Set progress dialog to indeterminate while connecting
    225             progressMonitor.indeterminateSubTask(tr("Connecting..."));
    226 
    227224            // Generate data for upload
    228225            ByteArrayOutputStream baos = new ByteArrayOutputStream();
     
    235232            HttpClient conn = setupConnection(baos.size());
    236233
    237             progressMonitor.setTicksCount(baos.size());
    238             progressMonitor.subTask(null);
    239 
    240234            // FIXME previous method allowed to see real % progress (each 10 Kb of data)
    241235            //flushToServer(bais, conn.getOutputStream(), progressMonitor);
    242             Response response = conn.setRequestBody(baos.toByteArray()).connect(progressMonitor);
     236            Response response = conn.setRequestBody(baos.toByteArray()).connect(progressMonitor.createSubTaskMonitor(1, false));
    243237
    244238            if (canceled) {
Note: See TracChangeset for help on using the changeset viewer.