From 29609b0e7a0aeffe5c9812d462d8b6760aae534b Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 18 Sep 2019 13:54:05 +0200 Subject: [PATCH] fix pos mapping for newRow --- .../package/contents/ui/launcher/LauncherDragManager.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/containments/homescreen/package/contents/ui/launcher/LauncherDragManager.qml b/containments/homescreen/package/contents/ui/launcher/LauncherDragManager.qml index dac20d0e..59f96768 100644 --- a/containments/homescreen/package/contents/ui/launcher/LauncherDragManager.qml +++ b/containments/homescreen/package/contents/ui/launcher/LauncherDragManager.qml @@ -67,7 +67,8 @@ Item { // Put it in the general view } else { - newRow = Math.round(newContainer.flow.width / delegate.width) * Math.floor((delegate.y + dragCenterY) / delegate.height) + Math.floor((delegate.x + dragCenterX) / delegate.width) + favoriteStrip.count; + var pos = launcherGrid.flow.mapFromItem(delegate, 0, 0); + newRow = Math.floor(newContainer.flow.width / delegate.width) * Math.floor((pos.y + dragCenterY) / delegate.height) + Math.round((pos.x + dragCenterX) / delegate.width) + favoriteStrip.count; //plasmoid.nativeInterface.applicationListModel.setLocation(delegate.modelData.index, ApplicationListModel.Grid);