diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-04-02 17:54:17 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-04-02 17:54:17 +0300 |
commit | e276558a50f06c6ec5d6b36b138ad5777dd05c0a (patch) | |
tree | 5176a972f4b9e38b7260aa0ac09a79cb14ef1c5d /source | |
parent | b75a7c2f8fb81eb7da067128dd90e3cd11406ab4 (diff) |
Fix T74983: Material preview icons don't refresh
The root cause of the issue reported in T74983 is that an `IDNode` would
not be marked as user-modified. This marking happened while looping over
outgoing relations of one of its operation nodes. Since rBff60dd8b18ed
unused relations are removed, and as a result the `IDNode` would not be
marked.
The solution was to move the responsible code outside the loop; this is
probably a good idea anyway, as the code did not actually use the
looped-over relations at all, and was thus repeated unnecessarily.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_flush.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc index dd72bc22a70..990002cf2e8 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc @@ -172,16 +172,17 @@ BLI_INLINE void flush_handle_component_node(IDNode *id_node, */ BLI_INLINE OperationNode *flush_schedule_children(OperationNode *op_node, FlushQueue *queue) { + if (op_node->flag & DEPSOP_FLAG_USER_MODIFIED) { + IDNode *id_node = op_node->owner->owner; + id_node->is_user_modified = true; + } + OperationNode *result = nullptr; for (Relation *rel : op_node->outlinks) { /* Flush is forbidden, completely. */ if (rel->flag & RELATION_FLAG_NO_FLUSH) { continue; } - if (op_node->flag & DEPSOP_FLAG_USER_MODIFIED) { - IDNode *id_node = op_node->owner->owner; - id_node->is_user_modified = true; - } /* Relation only allows flushes on user changes, but the node was not * affected by user. */ if ((rel->flag & RELATION_FLAG_FLUSH_USER_EDIT_ONLY) && |