Skip to content

Beginning of major rework of Plan editing user model#13702

Merged
DonLakeFlyer merged 1 commit intomasterfrom
PlanRework
Dec 5, 2025
Merged

Beginning of major rework of Plan editing user model#13702
DonLakeFlyer merged 1 commit intomasterfrom
PlanRework

Conversation

@DonLakeFlyer
Copy link
Copy Markdown
Collaborator

@DonLakeFlyer DonLakeFlyer commented Dec 5, 2025

  • Moved lesser used Fence/Rally off of main ui
  • Create new Start and Mission tabs to better indicate usage of those
  • Only edit a single mission item at a time
  • This is a major WIP which will improve from here

Screenshot 2025-12-05 at 12 01 44 PM

Copilot AI review requested due to automatic review settings December 5, 2025 20:04
Copy link
Copy Markdown
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 implements a major rework of the Plan View user interface to simplify mission editing workflows. The changes move less frequently used features (Fence/Rally) from the main tabbed interface to a consolidated "Other" tab, while introducing new "Start" and "Mission" tabs that focus on editing individual mission items rather than lists.

Key Changes:

  • Simplified tab structure: Start, Mission, and Other tabs replace the previous Mission, Fence, Rally (and UTMSP) tabs
  • Single mission item editing model instead of list-based editing
  • Converted editor components from QGCFlickable wrappers to direct Rectangle elements for cleaner layouts
  • Removed enablePlanViewSelector option from QGCOptions API

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/QmlControls/PlanView.qml Core refactoring: replaced layer-based tab system with tool-based tabs, implemented single-item editing with component loader pattern
src/QmlControls/MissionItemEditor.qml Removed conditional visibility based on isCurrentItem, now always displays the current item being edited
src/QmlControls/MissionSettingsEditor.qml Removed isCurrentItem visibility check as settings are now always visible when Start tab is selected
src/QmlControls/GeoFenceEditor.qml Converted from QGCFlickable to Rectangle, restructured layout hierarchy
src/QmlControls/RallyPointEditorHeader.qml Converted from QGCFlickable to Rectangle, simplified nested structure
src/UTMSP/UTMSPAdapterEditor.qml Converted from QGCFlickable to Rectangle, moved event handlers into PlanView.qml
src/API/QGCOptions.h Removed unused enablePlanViewSelector property

MissionItemEditor {
map: editorMap
masterController: _planMasterController
missionItem: _missionController.visualItems.get(0)
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The Start tab loads _missionController.visualItems.get(0) without checking if the visualItems list is empty. If there are no visual items (empty mission), this will return null/undefined and cause the MissionItemEditor to crash when accessing properties like missionItem.readyForSaveState, missionItem.sequenceNumber, etc. Add a null check or ensure the Start tab is only visible when visualItems.count > 0.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's never the case that there isn't at least one item

Comment on lines +712 to +717
MissionItemEditor {
map: editorMap
masterController: _planMasterController
missionItem: _missionController.currentPlanViewItem
onRemove: _missionController.removeVisualItem(_missionController.currentPlanViewVIIndex)
onSelectNextNotReadyItem: selectNextNotReady()
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The Mission tab loads _missionController.currentPlanViewItem which can be null (as seen in MissionController.cc line 2384). The MissionItemEditor accesses many properties on missionItem without null checks (e.g., missionItem.readyForSaveState at line 39, missionItem.sequenceNumber at line 116). This will crash if no mission item is currently selected. Either add null checks in MissionItemEditor or ensure this component is only loaded when currentPlanViewItem is not null.

Suggested change
MissionItemEditor {
map: editorMap
masterController: _planMasterController
missionItem: _missionController.currentPlanViewItem
onRemove: _missionController.removeVisualItem(_missionController.currentPlanViewVIIndex)
onSelectNextNotReadyItem: selectNextNotReady()
Item {
// Only show MissionItemEditor if currentPlanViewItem is not null
visible: _missionController.currentPlanViewItem !== null
MissionItemEditor {
map: editorMap
masterController: _planMasterController
missionItem: _missionController.currentPlanViewItem
onRemove: _missionController.removeVisualItem(_missionController.currentPlanViewVIIndex)
onSelectNextNotReadyItem: selectNextNotReady()
}

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not correct. As it stands now the mission settings item will always be there

* Moved lesser used Fence/Rally off of main ui
* Create new Start and Mission tabs to better indicate usage of those
* Only edit a single mission item at a time
* This is a major WIP which will improve from here
@DonLakeFlyer DonLakeFlyer merged commit c3decca into master Dec 5, 2025
21 of 22 checks passed
@DonLakeFlyer DonLakeFlyer deleted the PlanRework branch December 5, 2025 21:41
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