From 02370dee9852e38b9639800b3398daa178095253 Mon Sep 17 00:00:00 2001 From: davidsastresas Date: Tue, 19 Mar 2024 02:51:39 +0100 Subject: [PATCH] FlyViewMap.qml: ROI edit click area ocupying all the label: before this commit it was ocupying only the missionitemindex label, which is very small. Now it takes into account the are with the label as well --- src/FlightDisplay/FlyViewMap.qml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/FlightDisplay/FlyViewMap.qml b/src/FlightDisplay/FlyViewMap.qml index 72a7262..d2bd159 100644 --- a/src/FlightDisplay/FlyViewMap.qml +++ b/src/FlightDisplay/FlyViewMap.qml @@ -495,19 +495,22 @@ FlightMap { anchorPoint.x: sourceItem.anchorPointX anchorPoint.y: sourceItem.anchorPointY - sourceItem: MissionItemIndexLabel { - checked: true - index: -1 - label: qsTr("ROI here", "Make this a Region Of Interest") - - onClicked: (position) => { + MouseArea { + anchors.fill: parent + onClicked: { var roiEditMenu = popupMenuComponent.createObject(_root, { coord: roiLocationItem.coordinate, contentItemComponent: roiEditMenuComponent }) - var clickPoint = mapToItem(_root, position.x, position.y) + var clickPoint = mapToItem(_root, mouse.x, mouse.y) roiEditMenu.setPosition(clickPoint.x, clickPoint.y) roiEditMenu.open() } } + sourceItem: MissionItemIndexLabel { + checked: true + index: -1 + label: qsTr("ROI here", "Make this a Region Of Interest") + } + //-- Visibilty controlled by actual state function show(coord) { roiLocationItem.coordinate = coord