diff options
author | Jacques Lucke <jacques@blender.org> | 2021-10-26 18:53:29 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-10-26 18:53:41 +0300 |
commit | 01d7211380f513cf8f1f9c7cae923b1d19b26ebc (patch) | |
tree | c97eb73957616ad2347ef98e65462fefbbb54e85 /source | |
parent | efbd36429a0c381a972f7da97bc9fbc9096e5f20 (diff) |
Fix T92505: previewing specific node outputs did not work anymore
This was missing from my refactor in rB5bfe09df2244cb9de0b6554a378eecef77b1e75d.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/node_relationships.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc index 459608a67ea..76aad684b4c 100644 --- a/source/blender/editors/space_node/node_relationships.cc +++ b/source/blender/editors/space_node/node_relationships.cc @@ -768,6 +768,14 @@ static const NodeRef *get_existing_viewer(const NodeTreeRef &tree) static const OutputSocketRef *find_output_socket_to_be_viewed(const NodeRef *active_viewer_node, const NodeRef &node_to_view) { + /* Check if any of the output sockets is selected, which is the case when the user just clicked + * on the socket. */ + for (const OutputSocketRef *output_socket : node_to_view.outputs()) { + if (output_socket->bsocket()->flag & SELECT) { + return output_socket; + } + } + const OutputSocketRef *last_socket_linked_to_viewer = nullptr; if (active_viewer_node != nullptr) { for (const OutputSocketRef *output_socket : node_to_view.outputs()) { |