diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-30 10:03:17 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-30 10:03:17 +0400 |
commit | b735402c19782402e4a9970280cd3a3c8457296f (patch) | |
tree | 4f222847820bff67fef7a5ecdc78abf1cc02d2fc /source | |
parent | def15f275df4817408ec0e606e3122692540a9ef (diff) |
Fix #35144: Image editor is not updateing if in new window
Was a regression in own optimization on which viewer node to
update -- need to check all the windows' screens, not just
active one.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index eab483642bc..b3e24a9d6ed 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -128,25 +128,30 @@ static void compo_tag_output_nodes(bNodeTree *nodetree, int recalc_flags) static int compo_get_recalc_flags(const bContext *C) { - bScreen *sc = CTX_wm_screen(C); - ScrArea *sa; + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *win; int recalc_flags = 0; - for (sa = sc->areabase.first; sa; sa = sa->next) { - if (sa->spacetype == SPACE_IMAGE) { - SpaceImage *sima = sa->spacedata.first; - if (sima->image) { - if (sima->image->type == IMA_TYPE_R_RESULT) - recalc_flags |= COM_RECALC_COMPOSITE; - else if (sima->image->type == IMA_TYPE_COMPOSITE) + for (win = wm->windows.first; win; win = win->next) { + bScreen *sc = win->screen; + ScrArea *sa; + + for (sa = sc->areabase.first; sa; sa = sa->next) { + if (sa->spacetype == SPACE_IMAGE) { + SpaceImage *sima = sa->spacedata.first; + if (sima->image) { + if (sima->image->type == IMA_TYPE_R_RESULT) + recalc_flags |= COM_RECALC_COMPOSITE; + else if (sima->image->type == IMA_TYPE_COMPOSITE) + recalc_flags |= COM_RECALC_VIEWER; + } + } + else if (sa->spacetype == SPACE_NODE) { + SpaceNode *snode = sa->spacedata.first; + if (snode->flag & SNODE_BACKDRAW) recalc_flags |= COM_RECALC_VIEWER; } } - else if (sa->spacetype == SPACE_NODE) { - SpaceNode *snode = sa->spacedata.first; - if (snode->flag & SNODE_BACKDRAW) - recalc_flags |= COM_RECALC_VIEWER; - } } return recalc_flags; |