Unverified Commit b32f3527 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8496 from DonLakeFlyer/TakeoffItemWizard

Takeoff item wizard mode fix
parents 31bf8a24 685cb036
...@@ -39,6 +39,7 @@ TakeoffMissionItem::TakeoffMissionItem(const MissionItem& missionItem, Vehicle* ...@@ -39,6 +39,7 @@ TakeoffMissionItem::TakeoffMissionItem(const MissionItem& missionItem, Vehicle*
, _settingsItem (settingsItem) , _settingsItem (settingsItem)
{ {
_init(); _init();
_wizardMode = false;
} }
TakeoffMissionItem::~TakeoffMissionItem() TakeoffMissionItem::~TakeoffMissionItem()
...@@ -71,7 +72,7 @@ void TakeoffMissionItem::_init(void) ...@@ -71,7 +72,7 @@ void TakeoffMissionItem::_init(void)
_initLaunchTakeoffAtSameLocation(); _initLaunchTakeoffAtSameLocation();
if (homePosition.isValid() && coordinate().isValid()) { if (homePosition.isValid() && coordinate().isValid()) {
// Item already full specified, most likely from mission load from storage // Item already fully specified, most likely from mission load from storage
_wizardMode = false; _wizardMode = false;
} else { } else {
if (_launchTakeoffAtSameLocation && homePosition.isValid()) { if (_launchTakeoffAtSameLocation && homePosition.isValid()) {
...@@ -139,6 +140,7 @@ bool TakeoffMissionItem::load(QTextStream &loadStream) ...@@ -139,6 +140,7 @@ bool TakeoffMissionItem::load(QTextStream &loadStream)
if (success) { if (success) {
_initLaunchTakeoffAtSameLocation(); _initLaunchTakeoffAtSameLocation();
} }
_wizardMode = false; // Always be off for loaded items
return success; return success;
} }
...@@ -148,6 +150,7 @@ bool TakeoffMissionItem::load(const QJsonObject& json, int sequenceNumber, QStri ...@@ -148,6 +150,7 @@ bool TakeoffMissionItem::load(const QJsonObject& json, int sequenceNumber, QStri
if (success) { if (success) {
_initLaunchTakeoffAtSameLocation(); _initLaunchTakeoffAtSameLocation();
} }
_wizardMode = false; // Always be off for loaded items
return success; return success;
} }
......
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