Beginning of major rework of Plan editing user model#13702
Beginning of major rework of Plan editing user model#13702DonLakeFlyer merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
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
enablePlanViewSelectoroption 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
It's never the case that there isn't at least one item
| MissionItemEditor { | ||
| map: editorMap | ||
| masterController: _planMasterController | ||
| missionItem: _missionController.currentPlanViewItem | ||
| onRemove: _missionController.removeVisualItem(_missionController.currentPlanViewVIIndex) | ||
| onSelectNextNotReadyItem: selectNextNotReady() |
There was a problem hiding this comment.
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.
| 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() | |
| } |
There was a problem hiding this comment.
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
fb74f6b to
a5c62c5
Compare
Uh oh!
There was an error while loading. Please reload this page.