Changeset 14599 in josm for trunk/src/org/openstreetmap/josm/data/validation/Test.java
- Timestamp:
- 2018-12-24T09:40:06+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/Test.java
r14473 r14599 77 77 protected long startTime; 78 78 79 private boolean showElementCount; 80 79 81 /** 80 82 * Constructor … … 203 205 progressMonitor.setTicksCount(selection.size()); 204 206 } 207 long cnt = 0; 205 208 for (OsmPrimitive p : selection) { 206 209 if (isCanceled()) { … … 212 215 if (progressMonitor != null) { 213 216 progressMonitor.worked(1); 217 cnt++; 218 // add frequently changing info to progress monitor so that it 219 // doesn't seem to hang when test takes long 220 if (showElementCount && cnt % 1000 == 0) { 221 progressMonitor.setExtraText(tr("{0} of {1} elements done", cnt, selection.size())); 222 } 214 223 } 215 224 } … … 381 390 errors.clear(); 382 391 } 392 393 protected void setShowElements(boolean b) { 394 showElementCount = b; 395 } 383 396 }
Note:
See TracChangeset
for help on using the changeset viewer.