Let search results be dragged onto a folio like the tree

While a collection search is active the tree is replaced by the flat
ranked list, and that list had no drag support: dragging a result only
moved the selection. Anyone used to searching and then dragging lost the
drag as soon as they typed.

The tree's drag is moved into a static ElementsTreeView::execElementDrag()
taking the source widget, and the results list uses it from the path each
row already carries, so the drag content and pixmap are the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G2d2Zi8BfrYRPX88zhaoFG
This commit is contained in:
ispyisail
2026-09-27 01:56:46 +12:00
parent db387525e2
commit 926bbcf75f
3 changed files with 47 additions and 4 deletions
@@ -32,6 +32,8 @@ class ElementsTreeView : public QTreeView
{
public:
ElementsTreeView(QWidget *parent = nullptr);
static void execElementDrag(QWidget *source,
const ElementsLocation &location);
protected:
void startDrag(Qt::DropActions supportedActions) override;