Browse Source

Handle cross fact update internally

QGC4.4
Don Gagne 6 years ago
parent
commit
d1940918b8
  1. 10
      src/MissionManager/TransectStyleComplexItem.cc
  2. 1
      src/MissionManager/TransectStyleComplexItem.h

10
src/MissionManager/TransectStyleComplexItem.cc

@ -102,6 +102,8 @@ TransectStyleComplexItem::TransectStyleComplexItem(Vehicle* vehicle, bool flyVie @@ -102,6 +102,8 @@ TransectStyleComplexItem::TransectStyleComplexItem(Vehicle* vehicle, bool flyVie
connect(&_cameraCalc, &CameraCalc::distanceToSurfaceRelativeChanged, this, &TransectStyleComplexItem::coordinateHasRelativeAltitudeChanged);
connect(&_cameraCalc, &CameraCalc::distanceToSurfaceRelativeChanged, this, &TransectStyleComplexItem::exitCoordinateHasRelativeAltitudeChanged);
connect(&_hoverAndCaptureFact, &Fact::rawValueChanged, this, &TransectStyleComplexItem::_handleHoverAndCaptureEnabled);
connect(this, &TransectStyleComplexItem::visualTransectPointsChanged, this, &TransectStyleComplexItem::complexDistanceChanged);
connect(this, &TransectStyleComplexItem::visualTransectPointsChanged, this, &TransectStyleComplexItem::greatestDistanceToChanged);
@ -769,3 +771,11 @@ void TransectStyleComplexItem::_followTerrainChanged(bool followTerrain) @@ -769,3 +771,11 @@ void TransectStyleComplexItem::_followTerrainChanged(bool followTerrain)
_hoverAndCaptureFact.setRawValue(false);
}
}
void TransectStyleComplexItem::_handleHoverAndCaptureEnabled(QVariant enabled)
{
if (enabled.toBool() && _cameraTriggerInTurnAroundFact.rawValue().toBool()) {
qDebug() << "_handleHoverAndCaptureEnabled";
_cameraTriggerInTurnAroundFact.setRawValue(false);
}
}

1
src/MissionManager/TransectStyleComplexItem.h

@ -205,6 +205,7 @@ protected: @@ -205,6 +205,7 @@ protected:
private slots:
void _reallyQueryTransectsPathHeightInfo(void);
void _followTerrainChanged (bool followTerrain);
void _handleHoverAndCaptureEnabled (QVariant enabled);
private:
void _queryTransectsPathHeightInfo (void);

Loading…
Cancel
Save