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.
This commit is contained in:
Jacques Lucke 2021-10-25 11:30:41 +02:00
parent 15762e9611
commit 1ecb4e6fd8
Notes: blender-bot 2023-02-14 02:08:37 +01:00
Referenced by issue #92446, Geometry Nodes: Show Overlays and Wire Colors Bug, Resets to Default.
1 changed files with 2 additions and 3 deletions

View File

@ -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;