Commit 948e9d06 authored by David Goodman's avatar David Goodman

Fixed "Go To Here" and "Point Camera Here" map context actions to use correct mouse coordinates.

parent d916bfdd
...@@ -81,7 +81,7 @@ void QGCMapWidget::guidedActionTriggered() ...@@ -81,7 +81,7 @@ void QGCMapWidget::guidedActionTriggered()
} }
} }
// Create new waypoint and send it to the WPManager to send out. // Create new waypoint and send it to the WPManager to send out.
internals::PointLatLng pos = map->FromLocalToLatLng(mousePressPos.x(), mousePressPos.y()); internals::PointLatLng pos = map->FromLocalToLatLng(contextMousePressPos.x(), contextMousePressPos.y());
qDebug() << "Guided action requested. Lat:" << pos.Lat() << "Lon:" << pos.Lng(); qDebug() << "Guided action requested. Lat:" << pos.Lat() << "Lon:" << pos.Lng();
Waypoint wp; Waypoint wp;
wp.setLatitude(pos.Lat()); wp.setLatitude(pos.Lat());
...@@ -119,7 +119,7 @@ void QGCMapWidget::cameraActionTriggered() ...@@ -119,7 +119,7 @@ void QGCMapWidget::cameraActionTriggered()
if (newmav) if (newmav)
{ {
newmav->setMountConfigure(4,true,true,true); newmav->setMountConfigure(4,true,true,true);
internals::PointLatLng pos = map->FromLocalToLatLng(mousePressPos.x(), mousePressPos.y()); internals::PointLatLng pos = map->FromLocalToLatLng(contextMousePressPos.x(), contextMousePressPos.y());
newmav->setMountControl(pos.Lat(),pos.Lng(),100,true); newmav->setMountControl(pos.Lat(),pos.Lng(),100,true);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment