diff --git a/src/qml/Main.qml b/src/qml/Main.qml index a1873f8..f0f33e0 100644 --- a/src/qml/Main.qml +++ b/src/qml/Main.qml @@ -25,6 +25,7 @@ ApplicationWindow { onActivated: Qt.quit(); } DropArea { + enabled: !pathView.dragActive onDropped: (drop) => { Backend.handle_dropped_urls(drop.urls); } diff --git a/src/qml/PathView.qml b/src/qml/PathView.qml index 7abc308..48347d9 100644 --- a/src/qml/PathView.qml +++ b/src/qml/PathView.qml @@ -5,6 +5,8 @@ import Backend ListView { id: pathView + property bool dragActive: false + model: PathModel visible: count spacing: 6 @@ -33,10 +35,14 @@ ListView { onPreDragStarted: { PathModel.refresh_folded_paths(); } - onDragStarted: Settings.alwaysOnBottom = true + onDragStarted: { + Settings.alwaysOnBottom = true; + pathView.dragActive = true; + } onDragFinished: (dropAction) => { PathModel.taint_all_used(); Settings.alwaysOnBottom = false; + pathview.dragActive = false; } } } @@ -98,10 +104,14 @@ ListView { hoverEnabled: true acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: PathModel.open(index); - onDragStarted: Settings.alwaysOnBottom = true + onDragStarted: { + Settings.alwaysOnBottom = true; + pathView.dragActive = true; + } onDragFinished: (dropAction) => { PathModel.taint_used(index) Settings.alwaysOnBottom = false; + pathView.dragActive = false; } } }