From 804d3d4d73b9e0b393c01527cd16659f5ee972a0 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 10 Jul 2019 16:52:17 +0300 Subject: [PATCH] ignore regular files/links dragging in Normal mode --- containment/package/contents/ui/DragDropArea.qml | 6 +++--- containment/package/contents/ui/main.qml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/containment/package/contents/ui/DragDropArea.qml b/containment/package/contents/ui/DragDropArea.qml index 5d20c8887..d0b47cd59 100644 --- a/containment/package/contents/ui/DragDropArea.qml +++ b/containment/package/contents/ui/DragDropArea.qml @@ -145,7 +145,7 @@ DragDrop.DropArea { } } - if (!dragResistaner.running && (!latteApplet || (latteApplet && !dragInfo.isLatteTasks))) { + if (!ignoreRegularFiles && !dragResistaner.running && (!latteApplet || (latteApplet && !dragInfo.isLatteTasks))) { if (!isForeground) { dragResistaner.start(); } @@ -180,7 +180,7 @@ DragDrop.DropArea { } } - if (!dragResistaner.running && (!latteApplet || (latteApplet && !dragInfo.isLatteTasks))) { + if (!ignoreRegularFiles && !dragResistaner.running && (!latteApplet || (latteApplet && !dragInfo.isLatteTasks))) { if (!isForeground) { dragResistaner.start(); } @@ -215,7 +215,7 @@ DragDrop.DropArea { slotAnimationsNeedLength(-1); } - if (dragInfo.isTask || dockIsHidden || visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) { + if (ignoreRegularFiles && dragInfo.isTask || dockIsHidden || visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) { return; } diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index dec2c315c..61fcf0991 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -1755,6 +1755,11 @@ Item { && ((root.dragInfo.isPlasmoid && root.dragInfo.isSeparator) || (foreDropArea.dragInfo.computationsAreValid && !root.dragInfo.isPlasmoid && !root.dragInfo.onlyLaunchers)) + readonly property bool ignoreRegularFiles: !root.editMode + && (dragInfo.computationsAreValid || foreDropArea.dragInfo.computationsAreValid) + && !root.dragInfo.isPlasmoid + && !root.dragInfo.onlyLaunchers + Item{ id: panelBox anchors.fill: layoutsContainer