From a2e3659d99a93e2acdf978a6bce33385055ad633 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Fri, 24 Sep 2021 10:49:19 +0200 Subject: [PATCH] fix(StatusChatList): ensure right click popup opens in correct position This broke because the emitted `mouse` coordinates where no longer correct after we've moved the chat list item into a delegate model. --- src/StatusQ/Components/StatusChatList.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/StatusQ/Components/StatusChatList.qml b/src/StatusQ/Components/StatusChatList.qml index 8fe20149..89bd0f5a 100644 --- a/src/StatusQ/Components/StatusChatList.qml +++ b/src/StatusQ/Components/StatusChatList.qml @@ -145,7 +145,9 @@ Column { } } - popupMenuSlot.item.popup(mouse.x + 4, statusChatListItem.y + mouse.y + 6) + let p = statusChatListItem.mapToItem(statusChatList, mouse.x, mouse.y) + + popupMenuSlot.item.popup(p.x + 4, p.y + 6) popupMenuSlot.item.openHandler = originalOpenHandler return }