Commit aaa80e7e authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4661 from DonLakeFlyer/LostClicks

Plan: MissionItemEditor - Workaround strange lost clicks possible Qt bug
parents 43bd6a7c 2b9c7c08
......@@ -253,16 +253,19 @@ QGCView {
}
function setCurrentItem(sequenceNumber) {
editorMap.polygonDraw.cancelPolygonEdit()
_currentMissionItem = undefined
for (var i=0; i<_visualItems.count; i++) {
var visualItem = _visualItems.get(i)
if (visualItem.sequenceNumber == sequenceNumber) {
_currentMissionItem = visualItem
_currentMissionItem.isCurrentItem = true
_currentMissionIndex = i
} else {
visualItem.isCurrentItem = false
if (sequenceNumber !== _currentMissionIndex) {
editorMap.polygonDraw.cancelPolygonEdit()
_currentMissionItem = undefined
_currentMissionIndex = -1
for (var i=0; i<_visualItems.count; i++) {
var visualItem = _visualItems.get(i)
if (visualItem.sequenceNumber == sequenceNumber) {
_currentMissionItem = visualItem
_currentMissionItem.isCurrentItem = true
_currentMissionIndex = i
} else {
visualItem.isCurrentItem = false
}
}
}
}
......
......@@ -42,7 +42,6 @@ Rectangle {
MouseArea {
anchors.fill: parent
visible: !missionItem.isCurrentItem
onClicked: _root.clicked()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment