Fix T103136: Cannot activate viewer node in group
90ea1b7643 created an item for the viewer node path
but didn't add it to the list, which also caused memory leaks.
This commit is contained in:
@@ -64,6 +64,7 @@ static void viewer_path_for_geometry_node(const SpaceNode &snode,
|
||||
NodeViewerPathElem *node_elem = BKE_viewer_path_elem_new_node();
|
||||
node_elem->node_id = node->identifier;
|
||||
node_elem->node_name = BLI_strdup(node->name);
|
||||
BLI_addtail(&r_dst.path, node_elem);
|
||||
}
|
||||
|
||||
NodeViewerPathElem *viewer_node_elem = BKE_viewer_path_elem_new_node();
|
||||
@@ -111,7 +112,7 @@ void activate_geometry_node(Main &bmain, SpaceNode &snode, bNode &node)
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable viewer in one viewport if it is disable in all of them. */
|
||||
/* Enable viewer in one viewport if it is disabled in all of them. */
|
||||
if (!found_view3d_with_enabled_viewer && any_view3d_without_viewer != nullptr) {
|
||||
any_view3d_without_viewer->flag2 |= V3D_SHOW_VIEWER;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user