Unverified Commit 79fe25ef authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8034 from DonLakeFlyer/PlanCreator

Plan creator: Fix insertion of takeoff item
parents 9204a9f5 24a2bb69
......@@ -21,7 +21,7 @@ CorridorScanPlanCreator::CorridorScanPlanCreator(PlanMasterController* planMaste
void CorridorScanPlanCreator::createPlan(const QGeoCoordinate& mapCenterCoord)
{
_planMasterController->removeAll();
VisualMissionItem* takeoffItem = _missionController->insertSimpleMissionItem(mapCenterCoord, -1);
VisualMissionItem* takeoffItem = _missionController->insertTakeoffItem(mapCenterCoord, -1);
takeoffItem->setWizardMode(true);
_missionController->insertComplexMissionItem(MissionController::patternCorridorScanName, mapCenterCoord, -1)->setWizardMode(true);
if (_planMasterController->managerVehicle()->fixedWing()) {
......
......@@ -21,7 +21,7 @@ StructureScanPlanCreator::StructureScanPlanCreator(PlanMasterController* planMas
void StructureScanPlanCreator::createPlan(const QGeoCoordinate& mapCenterCoord)
{
_planMasterController->removeAll();
VisualMissionItem* takeoffItem = _missionController->insertSimpleMissionItem(mapCenterCoord, -1);
VisualMissionItem* takeoffItem = _missionController->insertTakeoffItem(mapCenterCoord, -1);
takeoffItem->setWizardMode(true);
_missionController->insertComplexMissionItem(MissionController::patternStructureScanName, mapCenterCoord, -1)->setWizardMode(true);
if (_planMasterController->managerVehicle()->fixedWing()) {
......
......@@ -22,7 +22,7 @@ SurveyPlanCreator::SurveyPlanCreator(PlanMasterController* planMasterController,
void SurveyPlanCreator::createPlan(const QGeoCoordinate& mapCenterCoord)
{
_planMasterController->removeAll();
VisualMissionItem* takeoffItem = _missionController->insertSimpleMissionItem(mapCenterCoord, -1);
VisualMissionItem* takeoffItem = _missionController->insertTakeoffItem(mapCenterCoord, -1);
takeoffItem->setWizardMode(true);
_missionController->insertComplexMissionItem(MissionController::patternSurveyName, mapCenterCoord, -1)->setWizardMode(true);
if (_planMasterController->managerVehicle()->fixedWing()) {
......
......@@ -221,14 +221,13 @@ Rectangle {
QGCLabel { text: missionItem.commandName }
QGCColoredImage {
height: ScreenTools.implicitComboBoxHeight - (ScreenTools.comboBoxPadding * 2)
height: ScreenTools.defaultFontPixelWidth
width: height
sourceSize.height: height
fillMode: Image.PreserveAspectFit
smooth: true
antialiasing: true
color: qgcPal.text
source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/double-arrow.png"
source: "/qmlimages/arrow-down.png"
}
}
......@@ -252,7 +251,7 @@ Rectangle {
id: commandLabel
anchors.leftMargin: ScreenTools.comboBoxPadding
anchors.fill: commandPicker
visible: (!missionItem.isCurrentItem || !missionItem.isSimpleItem || _waypointsOnlyMode) && !missionItem.isTakeoffItem
visible: !missionItem.isCurrentItem || !missionItem.isSimpleItem || _waypointsOnlyMode || missionItem.isTakeoffItem
verticalAlignment: Text.AlignVCenter
text: missionItem.commandName
color: _outerTextColor
......
......@@ -533,6 +533,7 @@ Item {
anchorPoint.x: sourceItem.width / 2
anchorPoint.y: sourceItem.height / 2
z: QGroundControl.zOrderWaypointLines + 1
visible: _editingLayer == _layerMission
sourceItem: SplitIndicator {
onClicked: insertSimpleMissionItem(splitSegmentItem.coordinate, _missionController.visualItemIndexFromSequenceNumber(_missionController.currentPlanViewIndex))
......
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