Skip to content

Conversation

@rubenp02
Copy link
Contributor

Fix LandingComplexItems hamburger menu options

Description

Fixed an issue where the movement options in the MissionItemEditor's hamburger menu for both fixed wing and VTOL LandingComplexItems only moved the approach primitive instead of the entire complex item. This happened because LandingComplexItem::setCoordinate method only repositioned the approach item.

Modified LandingComplexItem::setCoordinate to take over the functionality previously handled by the fixed-wing-only moveLandingPosition method. The relevant logic has also been updated to avoid unnecessary recalculations.

Other movement behaviors have been verified to be correct and remain unchanged for both fixed wing and VTOL. In summary:

  • FW landing patterns:
    • Drag land primitive on map: Moves entire pattern (no change)
    • Hamburger menu item movement options: Moves approach primitive only (before), moves entire pattern (after)
    • Landing point -> Set to vehicle location: Moves land primitive only (no change)
  • VTOL landing patterns:
    • Drag land primitive on map: Moves land primitive only (no change)
    • Hamburger menu item movement options: Moves approach primitive only (before), moves entire pattern (after)
    • Landing point -> Set to vehicle location: Moves land primitive only (no change)

Checklist:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fixed an issue where the movement options in the MissionItemEditor's
hamburger menu for both fixed wing and VTOL LandingComplexItems only
moved the approach primitive instead of the entire complex item. This
happened because LandingComplexItem::setCoordinate method only
repositioned the approach item.

Modified LandingComplexItem::setCoordinate to take over the
functionality previously handled by the fixed-wing-only
moveLandingPosition method. The relevant logic has also been updated to
avoid unnecessary recalculations.

Other movement behaviors have been verified to be correct and remain
unchanged for both fixed wing and VTOL. In summary:
- FW landing patterns:
    - Drag land primitive on map: Moves entire pattern (no change)
    - Hamburger menu item movement options: Moves approach primitive
      only (before), moves entire pattern (after)
    - Landing point -> Set to vehicle location: Moves land primitive
      only (no change)
- VTOL landing patterns:
    - Drag land primitive on map: Moves land primitive only (no change)
    - Hamburger menu item movement options: Moves approach primitive
      only (before), moves entire pattern (after)
    - Landing point -> Set to vehicle location: Moves land primitive
      only (no change)
Copilot AI review requested due to automatic review settings November 17, 2025 16:41
Copilot finished reviewing on behalf of rubenp02 November 17, 2025 16:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where the MissionItemEditor's hamburger menu movement options for both fixed-wing and VTOL landing patterns only moved the approach primitive instead of the entire complex item. The fix consolidates movement logic by implementing setCoordinate in the base LandingComplexItem class to properly handle moving the entire pattern while preserving heading and distance.

Key changes:

  • Implemented LandingComplexItem::setCoordinate to move the entire complex item while preserving heading and distance relationships
  • Removed the fixed-wing-specific moveLandingPosition method as its functionality is now handled by setCoordinate
  • Updated FWLandingPatternMapVisual.qml to use the new setCoordinate method for drag operations

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
LandingComplexItem.h Changed setCoordinate from inline implementation to full method declaration
LandingComplexItem.cc Implemented setCoordinate to preserve heading/distance while moving the landing coordinate
FixedWingLandingComplexItem.h Removed Q_INVOKABLE moveLandingPosition method declaration
FixedWingLandingComplexItem.cc Removed moveLandingPosition method implementation
FWLandingPatternMapVisual.qml Changed land point drag handler to use setCoordinate instead of moveLandingPosition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant