diff options
author | Elia Sarti <vekoon@gmail.com> | 2009-11-26 02:13:47 +0300 |
---|---|---|
committer | Elia Sarti <vekoon@gmail.com> | 2009-11-26 02:13:47 +0300 |
commit | aa5227664ab419d5446466fe0b3a368b05281fbe (patch) | |
tree | f1cbbcc27978d7948fd622fefc0b56f026bd676f /source/blender/editors | |
parent | f6b03893945cac9bd79ed5bfe7eed12b3805c97d (diff) |
After talking with Matt about this, added notifier NC_ID to handle ID changes, specifically ND_ID_RENAME for ID renaming. Done for outliner, 3d view and properties editor.
Diffstat (limited to 'source/blender/editors')
4 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 2c918bd9b30..de8a1616496 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -308,6 +308,10 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) if(wmn->data == ND_SPACE_PROPERTIES) ED_area_tag_redraw(sa); break; + case NC_ID: + if(wmn->data == ND_ID_RENAME) + ED_area_tag_redraw(sa); + break; } if(wmn->data == ND_KEYS) diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 39eecd7d2de..bfb1724af35 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -4747,7 +4747,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) case ID_SCE: WM_event_add_notifier(C, NC_SCENE, NULL); break; default: - WM_event_add_notifier(C, NC_MATERIAL, NULL); break; + WM_event_add_notifier(C, NC_ID|ND_ID_RENAME, NULL); break; } /* Check the library target exists */ if (te->idcode == ID_LI) { diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 5c6a8701f18..e3fbb13ed7d 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -147,6 +147,10 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) if(wmn->data == ND_SPACE_OUTLINER) ED_region_tag_redraw(ar); break; + case NC_ID: + if(wmn->data == ND_ID_RENAME) + ED_region_tag_redraw(ar); + break; } } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index d11eee466ed..787df5150f4 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -517,6 +517,10 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) if(wmn->data == ND_SPACE_VIEW3D) ED_region_tag_redraw(ar); break; + case NC_ID: + if(wmn->data == ND_ID_RENAME) + ED_region_tag_redraw(ar); + break; } } @@ -639,6 +643,10 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) if(wmn->data == ND_SPACE_VIEW3D) ED_region_tag_redraw(ar); break; + case NC_ID: + if(wmn->data == ND_ID_RENAME) + ED_region_tag_redraw(ar); + break; } } |