Fix #133927: Image editor not syncing with active image node

When active node is clicked again, the image editor does not update and
keeps showing the old image. Always run `ED_space_image_sync`, when
clicked node is image texture node to resolve this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/133956
This commit is contained in:
Pratik Borhade
2025-02-05 10:39:02 +01:00
committed by Pratik Borhade
parent 90ae533aa1
commit b545f8d223

View File

@@ -740,7 +740,6 @@ void snode_set_context(const bContext &C)
void ED_node_set_active(
Main *bmain, SpaceNode *snode, bNodeTree *ntree, bNode *node, bool *r_active_texture_changed)
{
const bool was_active_texture = (node->flag & NODE_ACTIVE_TEXTURE) != 0;
if (r_active_texture_changed) {
*r_active_texture_changed = false;
}
@@ -788,7 +787,7 @@ void ED_node_set_active(
BKE_main_ensure_invariants(*bmain, ntree->id);
if ((node->flag & NODE_ACTIVE_TEXTURE) && !was_active_texture) {
if (node->flag & NODE_ACTIVE_TEXTURE) {
/* If active texture changed, free GLSL materials. */
LISTBASE_FOREACH (Material *, ma, &bmain->materials) {
if (ma->nodetree && ma->use_nodes &&