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:
commit
dca3949533
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user