nodeview: attach pasted nodes to the cursor

This commit is contained in:
itsmattkc
2020-04-29 14:49:43 +10:00
parent 1db5cf4de4
commit d83073cf85
2 changed files with 96 additions and 60 deletions
+9 -2
View File
@@ -82,15 +82,22 @@ protected:
private:
void PlaceNode(NodeViewItem* n, const QPointF& pos);
void AttachItemToCursor(NodeViewItem* item);
void AttachItemToCursor(const QList<NodeViewItem*>& item);
void DetachItemFromCursor();
void SetFlowDirection(NodeViewCommon::FlowDirection dir);
void MoveAttachedNodesToCursor(const QPoint &p);
NodeGraph* graph_;
NodeViewItem* attached_item_;
struct AttachedItem {
NodeViewItem* item;
QPointF original_pos;
};
QList<AttachedItem> attached_items_;
NodeViewEdge* drop_edge_;
NodeInput* drop_input_;