Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-09-06 19:44:26 +0300
committerHans Goudey <h.goudey@me.com>2022-09-06 20:14:03 +0300
commitff17131109bb6ea8194527b04521be483a5a5729 (patch)
tree20dd52837f065e4782ed0788fb96d6713d69a6e7 /source/blender/editors/space_node
parent6830ba12a8591f9e7e5bff243f560bd570fbdce2 (diff)
Fix T100841: Creating a frame node with shortcut doesn't sort nodes
Before 58c650a44c25, the nodes span was rebuilt on every redraw. Now that it's only rebuilt as necessary, we need to tag it dirty when nodes are reordered. Relying on the order of the nodes at all isn't ideal, but it's fairly fundamental in many areas at the moment.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_draw.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 507748e68bc..3da799d0fd5 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -34,6 +34,7 @@
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
+#include "BKE_node_tree_update.h"
#include "BKE_object.h"
#include "DEG_depsgraph.h"
@@ -248,6 +249,7 @@ void node_sort(bNodeTree &ntree)
b++;
BLI_remlink(&ntree.nodes, tmp);
BLI_insertlinkbefore(&ntree.nodes, node_a, tmp);
+ BKE_ntree_update_tag_node_reordered(&ntree);
}
}