Skip to content

Conversation

@DonLakeFlyer
Copy link
Collaborator

PlanView.qml was getting unwieldy

Copilot AI review requested due to automatic review settings December 9, 2025 18:06
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 refactors PlanView.qml by extracting the right panel UI components into a separate file (PlanViewRightPanel.qml) to improve code organization and maintainability.

Key changes:

  • Created new PlanViewRightPanel.qml component containing all right panel logic
  • Removed approximately 200 lines of embedded component code from PlanView.qml
  • Updated property references to use the new component structure

Reviewed changes

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

File Description
src/QmlControls/PlanViewRightPanel.qml New file containing extracted right panel UI components with tab navigation and mission editing tools
src/QmlControls/PlanView.qml Removed right panel code and replaced with PlanViewRightPanel component instance
src/QmlControls/CMakeLists.txt Added PlanViewRightPanel.qml to the QML module build configuration
Comments suppressed due to low confidence (1)

src/QmlControls/PlanView.qml:1

  • Corrected spelling of 'it's' to 'its' (possessive form doesn't use an apostrophe).
/****************************************************************************


QGCTabButton {
text: qsTr("Start")
onClicked: { root._editingTool = root._editingToolStart; _editingLayer = _layerMission }
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The variable _editingLayer is referenced but not defined in PlanViewRightPanel.qml. This property exists in PlanView.qml but was not passed to the new component, which will cause runtime errors when clicking these tab buttons.

Copilot uses AI. Check for mistakes.

QGCTabButton {
text: qsTr("Mission")
onClicked: { root._editingTool = root._editingToolMissionItem; _editingLayer = _layerMission }
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The variable _editingLayer is referenced but not defined in PlanViewRightPanel.qml. This property exists in PlanView.qml but was not passed to the new component, which will cause runtime errors when clicking these tab buttons.

Copilot uses AI. Check for mistakes.

QGCTabButton {
text: qsTr("Other")
onClicked: { root._editingTool = root._editingToolOther; _editingLayer = _layerOther }
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The variable _editingLayer is referenced but not defined in PlanViewRightPanel.qml. This property exists in PlanView.qml but was not passed to the new component, which will cause runtime errors when clicking these tab buttons.

Copilot uses AI. Check for mistakes.
Comment on lines +213 to +214
triggerSubmitButton: _triggerSubmit
resetRegisterFlightPlan: _resetRegisterFlightPlan
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The properties _triggerSubmit and _resetRegisterFlightPlan are not defined in PlanViewRightPanel.qml. These properties were used in PlanView.qml but were not migrated to the new component, which will cause runtime errors.

Copilot uses AI. Check for mistakes.
interval: 2500
running: false
repeat: false
onTriggered: _resetGeofencePolygon = true
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

The property _resetGeofencePolygon is not defined in PlanViewRightPanel.qml. This property was used in PlanView.qml but was not migrated to the new component, which will cause a runtime error when the timer triggers.

Copilot uses AI. Check for mistakes.
@DonLakeFlyer DonLakeFlyer merged commit 54d5ce9 into master Dec 9, 2025
27 checks passed
@DonLakeFlyer DonLakeFlyer deleted the PlanViewRightPanel branch December 9, 2025 19:45
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.

2 participants