Modify ↓
Opened 8 years ago
Closed 8 years ago
#14179 closed enhancement (fixed)
Duplicated lines in GeoImageLayer.java
Reported by: | holgermappt | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | 16.12 |
Component: | Core image mapping | Version: | latest |
Keywords: | Cc: |
Description
This looks like duplicated code in src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
, lines 201-205:
progressMonitor.subTask(tr("Read photos...")); progressMonitor.setTicksCount(files.size()); progressMonitor.subTask(tr("Read photos...")); progressMonitor.setTicksCount(files.size());
If I interpret the ProgressMonitor
documentation correctly then subTask()
and setTicksCount()
both overwrite the value that was set in the previous call, so the same operation is done twice. If that interpretation is right it can be reduced to:
progressMonitor.subTask(tr("Read photos...")); progressMonitor.setTicksCount(files.size());
Attachments (0)
Note:
See TracTickets
for help on using tickets.
Nice catch, introduced in r2566, 7 years ago, and never noticed.