-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Move plan view right panel into it's own qml file #13722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 } |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
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.
|
|
||
| QGCTabButton { | ||
| text: qsTr("Mission") | ||
| onClicked: { root._editingTool = root._editingToolMissionItem; _editingLayer = _layerMission } |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
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.
|
|
||
| QGCTabButton { | ||
| text: qsTr("Other") | ||
| onClicked: { root._editingTool = root._editingToolOther; _editingLayer = _layerOther } |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
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.
| triggerSubmitButton: _triggerSubmit | ||
| resetRegisterFlightPlan: _resetRegisterFlightPlan |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
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.
| interval: 2500 | ||
| running: false | ||
| repeat: false | ||
| onTriggered: _resetGeofencePolygon = true |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
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.
PlanView.qml was getting unwieldy