Commit e8b9fd7a authored by Don Gagne's avatar Don Gagne

parent 4509f4b1
......@@ -1714,15 +1714,20 @@ void MissionController::managerVehicleChanged(Vehicle* managerVehicle)
void MissionController::_managerVehicleHomePositionChanged(const QGeoCoordinate& homePosition)
{
if (_visualItems) {
bool currentDirtyBit = dirty();
MissionSettingsItem* settingsItem = qobject_cast<MissionSettingsItem*>(_visualItems->get(0));
if (settingsItem) {
settingsItem->setHomePositionFromVehicle(homePosition);
} else {
qWarning() << "First item is not MissionSettingsItem";
}
// Don't let this trip the dirty bit. Otherwise plan will keep getting marked dirty if vehicle home
// changes.
_visualItems->setDirty(false);
if (!currentDirtyBit) {
// Don't let this trip the dirty bit. Otherwise plan will keep getting marked dirty if vehicle home
// changes.
_visualItems->setDirty(false);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment