mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-17 07:54:17 +01:00
LP-610 opmapwidget fix
This commit is contained in:
parent
8c101adccc
commit
7e07689cb5
@ -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