summaryrefslogtreecommitdiffstats
path: root/components/package/contents/ui/FolderListView.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-25 18:36:36 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-25 18:43:23 +0100
commit1e8da2a350ed25ce6cddfc93e287e5bafa633f0f (patch)
treed5fa205b38fb9e51197799b2d979f4581fd75738 /components/package/contents/ui/FolderListView.qml
parenta06a26736fe80d535082a4894da676015a5b0ffe (diff)
downloadkube-1e8da2a350ed25ce6cddfc93e287e5bafa633f0f.tar.gz
kube-1e8da2a350ed25ce6cddfc93e287e5bafa633f0f.zip
Implement move to folder per D&D
We have to trigger the drop explicitly in onReleased. Interestingly if we use "Drag.dragType: Drag.Automatic" then we don't need to explicitly call drop() and the drag and drop behaviour works as expected, but we end up no longer dragging the actual item from the listview, which is what we wanted to do (although we'll have to deal with the item reappering in the list only to then vanish from the actual move). It seems Drag.Automatic triggers a new style of drag that is now recommended but entirely undocumented, and we're doing some old-style/ backwardscompatible drag...
Diffstat (limited to 'components/package/contents/ui/FolderListView.qml')
-rw-r--r--components/package/contents/ui/FolderListView.qml6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/package/contents/ui/FolderListView.qml b/components/package/contents/ui/FolderListView.qml
index e7db2905..bc2932de 100644
--- a/components/package/contents/ui/FolderListView.qml
+++ b/components/package/contents/ui/FolderListView.qml
@@ -135,6 +135,12 @@ Rectangle {
135 135
136 visible: parent.containsDrag 136 visible: parent.containsDrag
137 } 137 }
138 onDropped: {
139 folderController.folder = model.domainObject
140 folderController.mail = drop.source.mail
141 folderController.moveToFolderAction.execute()
142 drop.accept(Qt.MoveAction)
143 }
138 } 144 }
139 145
140 Text { 146 Text {