From b0df19667fa30ad80631da86198710981ca03824 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 21 Jul 2015 11:24:29 +0200 Subject: 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, --- source/blender/editors/space_buttons/space_buttons.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_buttons') 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: -- cgit v1.2.3