mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-06 03:04:13 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user