Bugfix... very ancient one even. When you use multiple screens in a project

with each having different scenes, changing screens didn't call the proper
set_scene() call, which left quite some stuff improperly initialized.

With depsgraph code even causes crashing.
This commit is contained in:
Ton Roosendaal 2006-03-09 12:48:13 +00:00
parent dd91048c06
commit 610a813c0c
2 changed files with 9 additions and 1 deletions

@ -1504,6 +1504,11 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay)
DagAdjList *itA; DagAdjList *itA;
int lasttime; int lasttime;
if(sce->theDag==NULL) {
printf("DAG zero... not allowed to happen!\n");
DAG_scene_sort(sce);
}
firstnode= sce->theDag->DagNode.first; // always scene node firstnode= sce->theDag->DagNode.first; // always scene node
/* first we flush the layer flags */ /* first we flush the layer flags */

@ -75,6 +75,7 @@
#include "BKE_screen.h" #include "BKE_screen.h"
#include "BIF_cursors.h" #include "BIF_cursors.h"
#include "BIF_drawscene.h"
#include "BIF_editsound.h" #include "BIF_editsound.h"
#include "BIF_glutil.h" #include "BIF_glutil.h"
#include "BIF_gl.h" #include "BIF_gl.h"
@ -2227,7 +2228,9 @@ void setscreen(bScreen *sc)
sa->cursor= CURSOR_STD; sa->cursor= CURSOR_STD;
} }
G.scene= sc->scene; if(G.scene!=sc->scene)
set_scene(sc->scene);
countall(); countall();
G.curscreen->winakt= 0; G.curscreen->winakt= 0;