Changeset 19457 in josm


Ignore:
Timestamp:
2026-01-05T14:34:51+01:00 (6 days ago)
Author:
stoecker
Message:

fix #24005 - patch by StephaneP - Fix missing direction on last image when adding direction on an image layer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java

    r19426 r19457  
    446446                        double direction = curWp.bearing(nextWp);
    447447                        curTmp.setExifImgDir(computeDirection(direction, dirpos.getImageDirectionAngleOffset()));
     448                    } else if (nextWp == null && isLast && dirpos.isSetImageDirection()) {
     449                        //last image in the sequence without any next waypoint-> get previous direction angle
     450                        double direction = prevWp.bearing(curWp);
     451                        curTmp.setExifImgDir(computeDirection(direction, dirpos.getImageDirectionAngleOffset()));
    448452                    }
    449453                    curTmp.setGpsTime(curImg.getExifInstant().minusMillis(offset));
Note: See TracChangeset for help on using the changeset viewer.