Changeset 18635 in josm for trunk/src/org


Ignore:
Timestamp:
2023-01-17T14:13:17+01:00 (21 months ago)
Author:
taylor.smock
Message:

Fix #22626: Geotagged images from GPX files cannot be closed when rotated by exif data

This is due to the initial implementation of RemoteEntry#equals using the
width and height fields for calculating hashCode and equals. Since we may
set those two fields when showing the image, it does not make sense to use
them for hashCode or equals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntry.java

    r18622 r18635  
    334334    @Override
    335335    public int hashCode() {
    336         return Objects.hash(this.uri, this.width, this.height, this.pos,
     336        return Objects.hash(this.uri, this.pos,
    337337                this.exifOrientation, this.elevation, this.speed, this.exifImgDir,
    338338                this.exifCoor, this.exifTime, this.exifGpsTime, this.gpsTime,
     
    349349            RemoteEntry other = this.getClass().cast(obj);
    350350            return Objects.equals(this.uri, other.uri)
    351                     && this.height == other.height
    352                     && this.width == other.width
    353351                    && Objects.equals(this.elevation, other.elevation)
    354352                    && Objects.equals(this.exifCoor, other.exifCoor)
Note: See TracChangeset for help on using the changeset viewer.