paramview: always connect signals to real node rather than group
This commit is contained in:
@@ -97,6 +97,8 @@ NodeParamViewItemBody::NodeParamViewItemBody(Node* node, NodeParamViewCheckBoxBe
|
|||||||
|
|
||||||
int insert_row = 0;
|
int insert_row = 0;
|
||||||
|
|
||||||
|
QVector<Node*> connected_signals;
|
||||||
|
|
||||||
// Create widgets all root level components
|
// Create widgets all root level components
|
||||||
foreach (QString input, node->inputs()) {
|
foreach (QString input, node->inputs()) {
|
||||||
Node *n = node;
|
Node *n = node;
|
||||||
@@ -106,6 +108,14 @@ NodeParamViewItemBody::NodeParamViewItemBody(Node* node, NodeParamViewCheckBoxBe
|
|||||||
input = ni.input();
|
input = ni.input();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!connected_signals.contains(n)) {
|
||||||
|
connect(n, &Node::InputArraySizeChanged, this, &NodeParamViewItemBody::InputArraySizeChanged);
|
||||||
|
connect(n, &Node::InputConnected, this, &NodeParamViewItemBody::EdgeChanged);
|
||||||
|
connect(n, &Node::InputDisconnected, this, &NodeParamViewItemBody::EdgeChanged);
|
||||||
|
|
||||||
|
connected_signals.append(n);
|
||||||
|
}
|
||||||
|
|
||||||
if (!(n->GetInputFlags(input) & kInputFlagHidden)) {
|
if (!(n->GetInputFlags(input) & kInputFlagHidden)) {
|
||||||
CreateWidgets(root_layout, n, input, -1, insert_row);
|
CreateWidgets(root_layout, n, input, -1, insert_row);
|
||||||
|
|
||||||
@@ -137,10 +147,6 @@ NodeParamViewItemBody::NodeParamViewItemBody(Node* node, NodeParamViewCheckBoxBe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(node, &Node::InputArraySizeChanged, this, &NodeParamViewItemBody::InputArraySizeChanged);
|
|
||||||
connect(node, &Node::InputConnected, this, &NodeParamViewItemBody::EdgeChanged);
|
|
||||||
connect(node, &Node::InputDisconnected, this, &NodeParamViewItemBody::EdgeChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeParamViewItemBody::CreateWidgets(QGridLayout* layout, Node *node, const QString &input, int element, int row)
|
void NodeParamViewItemBody::CreateWidgets(QGridLayout* layout, Node *node, const QString &input, int element, int row)
|
||||||
|
|||||||
Reference in New Issue
Block a user