Commit 7db2a6fb authored by Eike Hein's avatar Eike Hein

Use new libtm API to enable DND reordering within group dialogs.

Summary: BUG:383405

Reviewers: #plasma, davidedmundson, argonel

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7268
parent 8dc89b7f
......@@ -99,10 +99,21 @@ Item {
}
if (tasksModel.sortMode == TaskManager.TasksModel.SortManual && tasks.dragSource) {
// Reject drags between different TaskList instances.
if (tasks.dragSource.parent != above.parent) {
return;
}
var insertAt = TaskTools.insertIndexAt(above, event.x, event.y);
if (!groupDialog.visible && tasks.dragSource != above && tasks.dragSource.itemIndex != insertAt) {
tasksModel.move(tasks.dragSource.itemIndex, insertAt);
if (tasks.dragSource != above && tasks.dragSource.itemIndex != insertAt) {
if (groupDialog.visible && groupDialog.visualParent) {
tasksModel.move(tasks.dragSource.itemIndex, insertAt,
tasksModel.makeModelIndex(groupDialog.visualParent.itemIndex));
} else {
tasksModel.move(tasks.dragSource.itemIndex, insertAt);
}
ignoredItem = above;
ignoreItemTimer.restart();
}
......
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