diff --git a/src/MissionEditor/MissionEditor.qml b/src/MissionEditor/MissionEditor.qml index dbd2f7142aefbbf033aa1be97337dec41e96ca8b..f4707076a30f6214daac09a9a12f16e2f501afb7 100644 --- a/src/MissionEditor/MissionEditor.qml +++ b/src/MissionEditor/MissionEditor.qml @@ -287,6 +287,7 @@ QGCView { if (addMissionItemsButton.checked) { var sequenceNumber = controller.insertSimpleMissionItem(coordinate, controller.visualItems.count) setCurrentItem(sequenceNumber) + editorListView.positionViewAtIndex(editorListView.count - 1, ListView.Contain) } else { editorMap.mapClicked(coordinate) } @@ -464,6 +465,13 @@ QGCView { opacity: _rightPanelOpacity z: QGroundControl.zOrderTopMost + MouseArea { + // This MouseArea prevents the Map below it from getting Mouse events. Without this + // things like mousewheel will scroll the Flickable and then scroll the map as well. + anchors.fill: editorListView + onWheel: wheel.accepted = true + } + ListView { id: editorListView anchors.left: parent.left @@ -494,6 +502,16 @@ QGCView { } onMoveHomeToMapCenter: controller.visualItems.get(0).coordinate = editorMap.center + + Connections { + target: object + + onIsCurrentItemChanged: { + if (object.isCurrentItem) { + editorListView.positionViewAtIndex(index, ListView.Contain) + } + } + } } } // ListView } // Item - Mission Item editor