Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
948e9d06
Commit
948e9d06
authored
Aug 29, 2013
by
David Goodman
Browse files
Fixed "Go To Here" and "Point Camera Here" map context actions to use correct mouse coordinates.
parent
d916bfdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/map/QGCMapWidget.cc
View file @
948e9d06
...
...
@@ -81,7 +81,7 @@ void QGCMapWidget::guidedActionTriggered()
}
}
// Create new waypoint and send it to the WPManager to send out.
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
m
ousePressPos
.
x
(),
m
ousePressPos
.
y
());
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
contextM
ousePressPos
.
x
(),
contextM
ousePressPos
.
y
());
qDebug
()
<<
"Guided action requested. Lat:"
<<
pos
.
Lat
()
<<
"Lon:"
<<
pos
.
Lng
();
Waypoint
wp
;
wp
.
setLatitude
(
pos
.
Lat
());
...
...
@@ -119,7 +119,7 @@ void QGCMapWidget::cameraActionTriggered()
if
(
newmav
)
{
newmav
->
setMountConfigure
(
4
,
true
,
true
,
true
);
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
m
ousePressPos
.
x
(),
m
ousePressPos
.
y
());
internals
::
PointLatLng
pos
=
map
->
FromLocalToLatLng
(
contextM
ousePressPos
.
x
(),
contextM
ousePressPos
.
y
());
newmav
->
setMountControl
(
pos
.
Lat
(),
pos
.
Lng
(),
100
,
true
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment