work towards finishing nodeview copy/paste refactor
This commit is contained in:
@@ -79,8 +79,7 @@ NodeViewItem::NodeViewItem(Node *node, const QString &input, int element, Node *
|
||||
setFlag(QGraphicsItem::ItemIsSelectable);
|
||||
|
||||
if (context_) {
|
||||
SetNodePosition(context_->GetNodePositionInContext(node_));
|
||||
SetExpanded(context_->IsNodeExpandedInContext(node_));
|
||||
SetNodePosition(context_->GetNodePositionDataInContext(node_));
|
||||
}
|
||||
} else {
|
||||
output_connector_->setVisible(false);
|
||||
@@ -110,6 +109,12 @@ void NodeViewItem::SetNodePosition(const QPointF &pos)
|
||||
UpdateNodePosition();
|
||||
}
|
||||
|
||||
void NodeViewItem::SetNodePosition(const Node::Position &pos)
|
||||
{
|
||||
SetNodePosition(pos.position);
|
||||
SetExpanded(pos.expanded);
|
||||
}
|
||||
|
||||
QVector<NodeViewEdge *> NodeViewItem::GetAllEdgesRecursively() const
|
||||
{
|
||||
QVector<NodeViewEdge *> list = edges_;
|
||||
|
||||
Reference in New Issue
Block a user