diff --git a/src/MissionEditor/SurveyItemEditor.qml b/src/MissionEditor/SurveyItemEditor.qml index ca6e369af8b492a6d4ecd86ce6ae243c12cc62a5..55d57223ace8230e73c2f2f8fcf39cf82391b39c 100644 --- a/src/MissionEditor/SurveyItemEditor.qml +++ b/src/MissionEditor/SurveyItemEditor.qml @@ -54,6 +54,22 @@ Rectangle { missionItem.cameraTriggerDistance.rawValue = cameraTriggerDistance } + Connections { + target: editorMap.polygonDraw + + onPolygonCaptureStarted: { + missionItem.clearPolygon() + } + + onPolygonCaptureFinished: { + for (var i=0; igetUIInfo(command); - return uiInfo->friendlyName(); + if (uiInfo) { + return uiInfo->friendlyName(); + } else { + return QString("MAV_CMD(%1)").arg((int)command); + } } QString MissionCommandTree::rawName(MAV_CMD command) @@ -182,7 +186,11 @@ QString MissionCommandTree::rawName(MAV_CMD command) MissionCommandList * commandList = _staticCommandTree[MAV_AUTOPILOT_GENERIC][MAV_TYPE_GENERIC]; MissionCommandUIInfo* uiInfo = commandList->getUIInfo(command); - return uiInfo->rawName(); + if (uiInfo) { + return uiInfo->rawName(); + } else { + return QString("MAV_CMD(%1)").arg((int)command); + } } const QList& MissionCommandTree::allCommandIds(void) const