diff --git a/app/node/group/group.cpp b/app/node/group/group.cpp index 1f7531fa4..4a6e7702f 100644 --- a/app/node/group/group.cpp +++ b/app/node/group/group.cpp @@ -58,14 +58,14 @@ void NodeGroup::Retranslate() } } -void NodeGroup::AddInputPassthrough(const NodeInput &input) +QString NodeGroup::AddInputPassthrough(const NodeInput &input) { Q_ASSERT(ContextContainsNode(input.node())); for (auto it=input_passthroughs_.cbegin(); it!=input_passthroughs_.cend(); it++) { if (it.value() == input) { // Already passing this input through - return; + return it.key(); } } @@ -77,6 +77,8 @@ void NodeGroup::AddInputPassthrough(const NodeInput &input) input_passthroughs_.insert(id, input); emit InputPassthroughAdded(this, input); + + return id; } void NodeGroup::RemoveInputPassthrough(const NodeInput &input) diff --git a/app/node/group/group.h b/app/node/group/group.h index 4a56b39db..cccfe36b7 100644 --- a/app/node/group/group.h +++ b/app/node/group/group.h @@ -41,7 +41,7 @@ public: virtual void Retranslate() override; - void AddInputPassthrough(const NodeInput &input); + QString AddInputPassthrough(const NodeInput &input); void RemoveInputPassthrough(const NodeInput &input);