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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-02 18:02:46 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-02 18:54:07 +0300
commit3e5483ffe10567731e3e84bb6f9ccc6ba1cdbce8 (patch)
tree1d29ec0ae82cd66ecf6a0badc8f06c411a04d188 /source/blender/depsgraph/intern/eval
parent500ebf7348bbc9307537fa51b1600f18be83d134 (diff)
Fix T57316: material preview icons not updating.
The editors update callback was getting the COW datablock, it should be the original where the preview icons are stored.
Diffstat (limited to 'source/blender/depsgraph/intern/eval')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 18806f389ca..d84f1be4ee0 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -262,9 +262,15 @@ void flush_editors_id_update(Main *bmain,
DEG_DEBUG_PRINTF((::Depsgraph *)graph,
EVAL, "Accumulated recalc bits for %s: %u\n",
id_orig->name, (unsigned int)id_cow->recalc);
- /* Inform editors. */
+
+ /* Inform editors. Only if the datablock is being evaluated a second
+ * time, to distinguish between user edits and initial evaluation when
+ * the datablock becomes visible.
+ *
+ * TODO: image datablocks do not use COW, so might not be detected
+ * correctly. */
if (deg_copy_on_write_is_expanded(id_cow)) {
- deg_editors_id_update(update_ctx, id_cow);
+ deg_editors_id_update(update_ctx, id_orig);
/* ID may need to get its auto-override operations refreshed. */
if (ID_IS_STATIC_OVERRIDE_AUTO(id_orig)) {
id_orig->tag |= LIB_TAG_OVERRIDESTATIC_AUTOREFRESH;