[Bf-blender-cvs] [1ecb4e6fd8f] master: Fix T92446: node editor overlays reset automatically

Jacques Lucke noreply at git.blender.org
Mon Oct 25 11:30:51 CEST 2021


Commit: 1ecb4e6fd8fcde581c8d79d9750a147361fa6915
Author: Jacques Lucke
Date:   Mon Oct 25 11:30:41 2021 +0200
Branches: master
https://developer.blender.org/rB1ecb4e6fd8fcde581c8d79d9750a147361fa6915

Fix T92446: node editor overlays reset automatically

Caused by rBcf72b10075758be971f9806b97db01f98383aba2.

The fix is to only enable the flags when a new node editor is actually created.

===================================================================

M	source/blender/editors/space_node/space_node.c

===================================================================

diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index bd2559c4d4d..8c015a56fa1 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -92,9 +92,6 @@ void ED_node_tree_start(SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
   snode->id = id;
   snode->from = from;
 
-  snode->overlay.flag |= SN_OVERLAY_SHOW_OVERLAYS;
-  snode->overlay.flag |= SN_OVERLAY_SHOW_WIRE_COLORS;
-
   ED_node_set_active_viewer_key(snode);
 
   WM_main_add_notifier(NC_SCENE | ND_NODES, NULL);
@@ -259,6 +256,8 @@ static SpaceLink *node_create(const ScrArea *UNUSED(area), const Scene *UNUSED(s
   snode->spacetype = SPACE_NODE;
 
   snode->flag = SNODE_SHOW_GPENCIL | SNODE_USE_ALPHA;
+  snode->overlay.flag |= SN_OVERLAY_SHOW_OVERLAYS;
+  snode->overlay.flag |= SN_OVERLAY_SHOW_WIRE_COLORS;
 
   /* backdrop */
   snode->zoom = 1.0f;



More information about the Bf-blender-cvs mailing list