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:
authorTon Roosendaal <ton@blender.org>2008-12-29 15:15:42 +0300
committerTon Roosendaal <ton@blender.org>2008-12-29 15:15:42 +0300
commit1580b6bc171ed33f8006a240c0c8379405fa8c27 (patch)
tree003472b1c414990044d6369b2760e5fdb2092e70 /source/blender/editors/space_outliner/space_outliner.c
parent3e29ff72049f4dc831e568e5a7ecfd13348a147c (diff)
2.5
More notifier cleanups: NC_SCENE|ND_OB_SELECT : scene level object selections changed NC_SCENE|ND_OB_ACTIVE : scene level, new active object NC_OBJECT|ND_BONE_SELECT : object level, bone selection changed NC_OBJECT|ND_BONE_ACTIVE: object level, new active bone I've made view3d listen to these, so operators that change selections don't have to tag own region for redraw anymore. Also enabled selecting/activating in outliner again. BTW: Added it in space_action, but Joshua has to code the proper refresh still :)
Diffstat (limited to 'source/blender/editors/space_outliner/space_outliner.c')
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index b84e337625a..35fb0cd0371 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -539,6 +539,32 @@ static void outliner_main_area_free(ARegion *ar)
{
}
+
+static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
+{
+ /* context changes */
+ switch(wmn->category) {
+ case NC_SCENE:
+ switch(wmn->data) {
+ case ND_OB_ACTIVE:
+ case ND_OB_SELECT:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ break;
+ case NC_OBJECT:
+ switch(wmn->data) {
+ case ND_BONE_ACTIVE:
+ case ND_BONE_SELECT:
+ case ND_TRANSFORM:
+ ED_region_tag_redraw(ar);
+ break;
+ }
+ }
+
+}
+
+
/* ************************ header outliner area region *********************** */
/* add handlers, stuff you only do once or on area/region changes */
@@ -688,6 +714,7 @@ void ED_spacetype_outliner(void)
art->init= outliner_main_area_init;
art->draw= outliner_main_area_draw;
art->free= outliner_main_area_free;
+ art->listener= outliner_main_area_listener;
BLI_addhead(&st->regiontypes, art);
/* regions: header */