1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

Merged in julian_lilov/librepilot-jdl-gcs-pp-fix/LP-610 (pull request #530)

LP-610 OPMapWidget::WPInsert fix

Approved-by: Lalanne Laurent <f5soh@free.fr>
This commit is contained in:
Julian Lilov 2019-04-30 18:17:35 +00:00 committed by Lalanne Laurent
commit dca3949533

View File

@ -340,11 +340,9 @@ WayPointItem *OPMapWidget::WPInsert(internals::PointLatLng const & coord, int co
WayPointItem *OPMapWidget::WPInsert(internals::PointLatLng const & coord, int const & altitude, QString const & description, const int &position)
{
internals::PointLatLng mcoord;
bool reloc = false;
if (mcoord == internals::PointLatLng(0, 0)) {
if (coord == internals::PointLatLng(0, 0)) {
mcoord = CurrentPosition();
reloc = true;
} else {
mcoord = coord;
}
@ -353,9 +351,7 @@ WayPointItem *OPMapWidget::WPInsert(internals::PointLatLng const & coord, int co
ConnectWP(item);
item->setParentItem(map);
emit WPInserted(position, item);
if (reloc) {
emit WPValuesChanged(item);
}
emit WPValuesChanged(item);
setOverlayOpacity(overlayOpacity);
return item;
}