Skip to content

Commit

Permalink
Fix terrain follow preset handling
Browse files Browse the repository at this point in the history
  • Loading branch information
DonLakeFlyer committed Mar 27, 2021
1 parent d9b75a0 commit 357cdac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/MissionManager/TransectStyleComplexItem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ bool TransectStyleComplexItem::_load(const QJsonObject& complexObject, bool forP
}
}

if (!forPresets) {
if (forPresets) {
// Most signalling will happen after the transects are rebuilt so we don't over signal here
emit followTerrainChanged(_followTerrain);
} else {
emit minAMSLAltitudeChanged();
emit maxAMSLAltitudeChanged();
_amslEntryAltChanged();
Expand Down
4 changes: 4 additions & 0 deletions src/PlanView/TransectStyleComplexItemTerrainFollow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ ColumnLayout {
text: qsTr("Vehicle follows terrain")
checked: missionItem.followTerrain
onClicked: missionItem.followTerrain = checked

Binding on checkedState {
value: missionItem.followTerrain ? Qt.Checked : Qt.Unchecked
}
}

GridLayout {
Expand Down

0 comments on commit 357cdac

Please sign in to comment.