nodeview: allow dragging edges from their arrows

Fixes #1594
This commit is contained in:
itsmattkc
2021-04-27 18:48:40 +10:00
parent cd1d75c6fb
commit a7d7515ba7
4 changed files with 38 additions and 9 deletions
+5 -1
View File
@@ -33,10 +33,12 @@
namespace olive {
#define super QGraphicsPathItem
NodeViewEdge::NodeViewEdge(const NodeOutput &output, const NodeInput &input,
NodeViewItem* from_item, NodeViewItem* to_item,
QGraphicsItem* parent) :
QGraphicsPathItem(parent),
super(parent),
output_(output),
input_(input),
from_item_(from_item),
@@ -150,6 +152,8 @@ void NodeViewEdge::SetPoints(const QPointF &start, const QPointF &end, bool inpu
arrow_points[3] = end;
arrow_ = QPolygonF(arrow_points);
arrow_bounding_rect_ = arrow_.boundingRect();
arrow_bounding_rect_.adjust(-arrow_size_, -arrow_size_, arrow_size_, arrow_size_);
}
void NodeViewEdge::SetFlowDirection(NodeViewCommon::FlowDirection dir)