groups: started revision

- Removed UUIDs since we already have ptrs
- Changed input passthroughs from map to list so they'll always be added in the same order
- Fixed group copy on duplication
- Fixed group copy on clip split
This commit is contained in:
itsmattkc
2022-04-03 19:18:39 -07:00
parent 49e622ac0f
commit afaf6bcf92
12 changed files with 174 additions and 82 deletions
+10 -4
View File
@@ -464,10 +464,16 @@ void NodeViewItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QVariant NodeViewItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
{
if (change == ItemPositionHasChanged && node_) {
ReadjustAllEdges();
if (node_) {
if (change == ItemPositionHasChanged) {
ReadjustAllEdges();
UpdateContextRect();
UpdateContextRect();
} else if (change == ItemSelectedHasChanged) {
if (value.toBool()) {
qDebug() << "Selected node:" << node_;
}
}
}
return QGraphicsItem::itemChange(change, value);
@@ -786,7 +792,7 @@ NodeViewItem *NodeViewItem::GetItemForInput(NodeInput input)
if (NodeGroup *group = dynamic_cast<NodeGroup*>(node_)) {
if (input.node() != group) {
// Translate input to group input
QString id = NodeGroup::GetGroupInputIDFromInput(input);
QString id = group->GetIDOfPassthrough(input);
input.set_node(group);
input.set_input(id);
}