Skip to content

Commit

Permalink
merian-nodes: Graph: Fix node does not get disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Aug 23, 2024
1 parent 9b44989 commit 86867c7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/merian-nodes/graph/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,15 @@ class Graph : public std::enable_shared_from_this<Graph<RING_SIZE>> {
} else {
NodeData::PerInputInfo& input_info = data.input_connections[input];
if (input_info.node && !node_data.at(input_info.node).errors.empty()) {
data.input_connections[input] = NodeData::PerInputInfo();
if (input->optional) {
data.input_connections[input] = NodeData::PerInputInfo();
} else {
data.input_connections.erase(input);
std::string error =
make_error_input_not_connected(input, node, data);
SPDLOG_WARN(error);
data.errors.emplace_back(std::move(error));
}
break;
}
}
Expand Down

0 comments on commit 86867c7

Please sign in to comment.