Changeset 17574 in josm
- Timestamp:
- 2021-03-16T23:57:41+01:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/ImageData.java
r17460 r17574 64 64 } 65 65 this.geoImages.addAll(this.data); 66 data.forEach(image -> image.setDataSet(this)); 66 67 selectedImagesIndex.add(-1); 67 68 } … … 218 219 219 220 /** 221 * Indicate that a entry has changed 222 * @param gpxImageEntry The entry to update 223 * @since xxx 224 */ 225 public void fireNodeMoved(ImageEntry gpxImageEntry) { 226 this.geoImages.remove(gpxImageEntry); 227 this.geoImages.add(gpxImageEntry); 228 } 229 230 /** 220 231 * Remove the image from the list of selected images 221 232 * @param image {@link ImageEntry} the image to remove -
trunk/src/org/openstreetmap/josm/data/gpx/GpxImageEntry.java
r17565 r17574 552 552 public BBox getBBox() { 553 553 // new BBox(LatLon) is null safe. 554 // Use `getPos` instead of `getExifCoor` since the image may be co orelated against a GPX track554 // Use `getPos` instead of `getExifCoor` since the image may be correlated against a GPX track 555 555 return new BBox(this.getPos()); 556 556 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
r16488 r17574 7 7 import java.util.Objects; 8 8 9 import org.openstreetmap.josm.data.ImageData; 9 10 import org.openstreetmap.josm.data.gpx.GpxImageEntry; 10 11 … … 16 17 17 18 private Image thumbnail; 19 private ImageData dataSet; 18 20 19 21 /** … … 76 78 77 79 @Override 80 public void applyTmp() { 81 super.applyTmp(); 82 if (this.dataSet != null) { 83 this.dataSet.fireNodeMoved(this); 84 } 85 } 86 87 @Override 88 public void discardTmp() { 89 super.discardTmp(); 90 if (this.dataSet != null) { 91 this.dataSet.fireNodeMoved(this); 92 } 93 } 94 95 /** 96 * Set the dataset for this image 97 * @param imageData The dataset 98 * @since xxx 99 */ 100 public void setDataSet(ImageData imageData) { 101 this.dataSet = imageData; 102 } 103 104 /** 105 * Get the dataset for this image 106 * @return The dataset 107 * @since xxx 108 */ 109 public ImageData getDataSet() { 110 return this.dataSet; 111 } 112 113 114 @Override 78 115 public int hashCode() { 79 116 return Objects.hash(super.hashCode(), thumbnail);
Note:
See TracChangeset
for help on using the changeset viewer.