Skip to content

Commit

Permalink
Only load editor if current item
Browse files Browse the repository at this point in the history
Improves performance/memory on very large plans
  • Loading branch information
DonLakeFlyer committed Dec 27, 2024
1 parent 9beae12 commit 2d03c0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/PlanView/MissionItemEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import QGroundControl.Palette
/// Mission item edit control
Rectangle {
id: _root
height: editorLoader.visible ? (editorLoader.y + editorLoader.height + _innerMargin) : (topRowLayout.y + topRowLayout.height + _margin)
height: _currentItem ? (editorLoader.y + editorLoader.height + _innerMargin) : (topRowLayout.y + topRowLayout.height + _margin)
color: _currentItem ? qgcPal.missionItemEditor : qgcPal.windowShade
radius: _radius
opacity: _currentItem ? 1.0 : 0.7
Expand Down Expand Up @@ -277,8 +277,7 @@ Rectangle {
anchors.margins: _innerMargin
anchors.left: parent.left
anchors.top: topRowLayout.bottom
source: missionItem.editorQml
visible: _currentItem
source: _currentItem ? missionItem.editorQml : ""

property var masterController: _masterController
property real availableWidth: _root.width - (anchors.margins * 2) ///< How wide the editor should be
Expand Down

0 comments on commit 2d03c0e

Please sign in to comment.