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@pandora.be>2011-09-06 21:18:50 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-06 21:18:50 +0400
commit2ebc534900ab7ccaa37ec25dcc1aa24230fb1426 (patch)
tree9f35e7868b09f3f87e3acde31db58d29814383a3 /source/blender/makesrna/intern/rna_screen.c
parentc8a092789f5e53ebf418457bd2f7ea1a3818d0b7 (diff)
Fix screen/scene browsing in info header not working right, mistake in code cleanup.
Diffstat (limited to 'source/blender/makesrna/intern/rna_screen.c')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 59707f05e6f..bd1021f038a 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -68,13 +68,14 @@ static void rna_Screen_scene_set(PointerRNA *ptr, PointerRNA value)
sc->newscene= value.data;
}
-static void rna_Screen_scene_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr)
{
bScreen *sc= (bScreen*)ptr->data;
- /* exception: can't set screens inside of area/region handers */
+ /* exception: can't set screens inside of area/region handers, and must
+ use context so notifier gets to the right window */
if(sc->newscene) {
- WM_main_add_notifier(NC_SCENE|ND_SCENEBROWSE, sc->newscene);
+ WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene);
sc->newscene= NULL;
}
}
@@ -231,6 +232,7 @@ static void rna_def_screen(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen");
+ RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, 0, "rna_Screen_scene_update");
/* collections */