diff --git a/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustWorker.java b/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustWorker.java
index 013a167..ab78cf6 100644
|
a
|
b
|
import org.openstreetmap.josm.gui.MainApplication;
|
| 15 | 15 | import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer; |
| 16 | 16 | import org.openstreetmap.josm.gui.layer.geoimage.ImageEntry; |
| 17 | 17 | import org.openstreetmap.josm.gui.layer.geoimage.ImageViewerDialog; |
| | 18 | import org.openstreetmap.josm.gui.util.imagery.Vector3D; |
| | 19 | import org.openstreetmap.josm.tools.Utils; |
| 18 | 20 | |
| 19 | 21 | /** |
| 20 | 22 | * Class that does the actual work. |
| … |
… |
public class PhotoAdjustWorker {
|
| 239 | 241 | return; |
| 240 | 242 | } |
| 241 | 243 | final LatLon mouseLL = MainApplication.getMap().mapView.getLatLon(evt.getX(), evt.getY()); |
| | 244 | Vector3D viewerVector = ImageViewerDialog.getInstance().getRotation(photo); |
| | 245 | double viewerAngle = viewerVector != null ? Utils.toDegrees(viewerVector.getPolarAngle()) : 0d; |
| 242 | 246 | // The projection doesn't matter here. |
| 243 | | double direction = photoLL.bearing(mouseLL) * 360.0 / 2.0 / Math.PI; |
| | 247 | double direction = photoLL.bearing(mouseLL) * 360.0 / 2.0 / Math.PI - viewerAngle; |
| 244 | 248 | if (direction < 0.0) { |
| 245 | 249 | direction += 360.0; |
| 246 | 250 | } else if (direction >= 360.0) { |