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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-07-21 12:24:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-21 12:26:42 +0300
commitb0df19667fa30ad80631da86198710981ca03824 (patch)
treecffb147212139a4411e5c1974568064400f2d4a6 /source/blender/editors/space_buttons
parentb23c6c430f9c405bab22fc8cd19b7c7916a29f71 (diff)
Fix T45317: Cycles material preview unnecessarily re-rendering
The issue was caused by wrong fix for T22741 which forced redraws on any window event, like Expose. Use proper NV_WM | ND_UNDO listener instead,
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 6704431c705..e28ad686d2a 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -371,9 +371,11 @@ static void buttons_area_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *
}
break;
/* Listener for preview render, when doing an global undo. */
- case NC_WINDOW:
- ED_area_tag_redraw(sa);
- sbuts->preview = 1;
+ case NC_WM:
+ if (wmn->data == ND_UNDO) {
+ ED_area_tag_redraw(sa);
+ sbuts->preview = 1;
+ }
break;
#ifdef WITH_FREESTYLE
case NC_LINESTYLE: