Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
e869bac6
Commit
e869bac6
authored
Jul 03, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor tweaks on waypoint interaction. Suspected bug in OPMapControl mouse position handling.
parent
0b0fbe87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+4
-2
Waypoint2DIcon.cc
src/ui/map/Waypoint2DIcon.cc
+4
-1
No files found.
src/ui/map/QGCMapWidget.cc
View file @
e869bac6
...
@@ -362,13 +362,13 @@ void QGCMapWidget::setUpdateRateLimit(float seconds)
...
@@ -362,13 +362,13 @@ void QGCMapWidget::setUpdateRateLimit(float seconds)
void
QGCMapWidget
::
handleMapWaypointEdit
(
mapcontrol
::
WayPointItem
*
waypoint
)
void
QGCMapWidget
::
handleMapWaypointEdit
(
mapcontrol
::
WayPointItem
*
waypoint
)
{
{
qDebug
()
<<
"UPDATING WP FROM MAP"
;
// Block circle updates
// Block circle updates
Waypoint
*
wp
=
iconsToWaypoints
.
value
(
waypoint
,
NULL
);
Waypoint
*
wp
=
iconsToWaypoints
.
value
(
waypoint
,
NULL
);
// Protect from vicious double update cycle
// Protect from vicious double update cycle
if
(
firingWaypointChange
==
wp
||
!
wp
)
return
;
if
(
firingWaypointChange
==
wp
)
return
;
// Not in cycle, block now from entering it
// Not in cycle, block now from entering it
firingWaypointChange
=
wp
;
firingWaypointChange
=
wp
;
qDebug
()
<<
"UPDATING WP FROM MAP"
;
// Update WP values
// Update WP values
internals
::
PointLatLng
pos
=
waypoint
->
Coord
();
internals
::
PointLatLng
pos
=
waypoint
->
Coord
();
...
@@ -376,6 +376,8 @@ void QGCMapWidget::handleMapWaypointEdit(mapcontrol::WayPointItem* waypoint)
...
@@ -376,6 +376,8 @@ void QGCMapWidget::handleMapWaypointEdit(mapcontrol::WayPointItem* waypoint)
wp
->
setLongitude
(
pos
.
Lng
());
wp
->
setLongitude
(
pos
.
Lng
());
wp
->
setAltitude
(
waypoint
->
Altitude
());
wp
->
setAltitude
(
waypoint
->
Altitude
());
qDebug
()
<<
"WP: LAT:"
<<
pos
.
Lat
()
<<
"LON:"
<<
pos
.
Lng
();
emit
waypointChanged
(
wp
);
emit
waypointChanged
(
wp
);
firingWaypointChange
=
NULL
;
firingWaypointChange
=
NULL
;
}
}
...
...
src/ui/map/Waypoint2DIcon.cc
View file @
e869bac6
...
@@ -35,7 +35,7 @@ Waypoint2DIcon::Waypoint2DIcon(mapcontrol::MapGraphicItem* map, mapcontrol::OPMa
...
@@ -35,7 +35,7 @@ Waypoint2DIcon::Waypoint2DIcon(mapcontrol::MapGraphicItem* map, mapcontrol::OPMa
// drawIcon(mypen);
// drawIcon(mypen);
this
->
setFlag
(
QGraphicsItem
::
ItemIgnoresTransformations
,
true
);
this
->
setFlag
(
QGraphicsItem
::
ItemIgnoresTransformations
,
true
);
picture
=
QPixmap
(
radius
+
1
,
radius
+
1
);
picture
=
QPixmap
(
radius
+
1
,
radius
+
1
);
drawIcon
();
updateWaypoint
();
}
}
Waypoint2DIcon
::~
Waypoint2DIcon
()
Waypoint2DIcon
::~
Waypoint2DIcon
()
...
@@ -63,6 +63,9 @@ void Waypoint2DIcon::updateWaypoint()
...
@@ -63,6 +63,9 @@ void Waypoint2DIcon::updateWaypoint()
SetHeading
(
waypoint
->
getYaw
());
SetHeading
(
waypoint
->
getYaw
());
SetCoord
(
internals
::
PointLatLng
(
waypoint
->
getLatitude
(),
waypoint
->
getLongitude
()));
SetCoord
(
internals
::
PointLatLng
(
waypoint
->
getLatitude
(),
waypoint
->
getLongitude
()));
qDebug
()
<<
"UPDATING WP:"
<<
waypoint
->
getId
()
<<
"LAT:"
<<
waypoint
->
getLatitude
()
<<
"LON:"
<<
waypoint
->
getLongitude
();
SetDescription
(
waypoint
->
getDescription
());
SetDescription
(
waypoint
->
getDescription
());
SetAltitude
(
waypoint
->
getAltitude
());
SetAltitude
(
waypoint
->
getAltitude
());
// FIXME Add SetNumber (currently needs a separate call)
// FIXME Add SetNumber (currently needs a separate call)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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