Changeset 2646 in josm
- Timestamp:
- 2009-12-17T00:06:01+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/layer/geoimage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r2626 r2646 431 431 // Construct the list of loaded GPX tracks 432 432 Collection<Layer> layerLst = Main.main.map.mapView.getAllLayers(); 433 GpxDataWrapper defaultItem = null; 433 434 Iterator<Layer> iterLayer = layerLst.iterator(); 434 435 while (iterLayer.hasNext()) { 435 436 Layer cur = iterLayer.next(); 436 437 if (cur instanceof GpxLayer) { 437 gpxLst.add(new GpxDataWrapper(((GpxLayer) cur).getName(),438 GpxDataWrapper gdw = new GpxDataWrapper(((GpxLayer) cur).getName(), 438 439 ((GpxLayer) cur).data, 439 ((GpxLayer) cur).data.storageFile)); 440 ((GpxLayer) cur).data.storageFile); 441 gpxLst.add(gdw); 442 if (cur == yLayer.gpxLayer) { 443 System.err.println("Hier!"); 444 defaultItem = gdw; 445 } 440 446 } 441 447 } … … 456 462 457 463 cbGpx = new JComboBox(gpxLst); 464 if (defaultItem != null) { 465 cbGpx.setSelectedItem(defaultItem); 466 } 458 467 panelCb.add(cbGpx); 459 468 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r2629 r2646 72 72 73 73 List<ImageEntry> data; 74 74 GpxLayer gpxLayer; 75 75 76 private Icon icon = ImageProvider.get("dialogs/geoimage/photo-marker"); 76 77 private Icon selectedIcon = ImageProvider.get("dialogs/geoimage/photo-marker-selected"); … … 132 133 private HashSet<String> loadedDirectories = new HashSet<String>(); 133 134 private LinkedHashSet<String> errorMessages; 135 private GpxLayer gpxLayer; 134 136 135 137 protected void rememberError(String message) { … … 140 142 super(tr("Extracting GPS locations from EXIF")); 141 143 this.selection = selection; 144 this.gpxLayer = gpxLayer; 142 145 errorMessages = new LinkedHashSet<String>(); 143 146 } … … 187 190 data.add(e); 188 191 } 189 layer = new GeoImageLayer(data );192 layer = new GeoImageLayer(data, gpxLayer); 190 193 files.clear(); 191 194 } … … 301 304 } 302 305 303 private GeoImageLayer(final List<ImageEntry> data ) {306 private GeoImageLayer(final List<ImageEntry> data, GpxLayer gpxLayer) { 304 307 305 308 super(tr("Geotagged Images")); … … 307 310 Collections.sort(data); 308 311 this.data = data; 312 this.gpxLayer = gpxLayer; 309 313 Main.map.mapView.addPropertyChangeListener(this); 310 314 }
Note:
See TracChangeset
for help on using the changeset viewer.