diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-23 00:52:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-23 00:52:58 +0300 |
commit | 3b0a5dd15884aed00d988d73a72f4946673f8be9 (patch) | |
tree | 07f488e24eb2b9f9b3dfce9d15ac66dabd74b7e4 /source/blender/editors/util | |
parent | 97ee7f8609bed555ff4bd371b7e25d13b2d6a0d6 (diff) | |
parent | 7547c6a250cd6f36c9894605b822380a1261febf (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/ed_util.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 1f4ce926f16..e2f60955c81 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -57,6 +57,7 @@ #include "BKE_multires.h" #include "BKE_packedFile.h" #include "BKE_paint.h" +#include "BKE_screen.h" #include "ED_armature.h" #include "ED_buttons.h" @@ -326,22 +327,14 @@ void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *ar, void *arg_info /** * Use to free ID references within runtime data (stored outside of DNA) * - * \note Typically notifiers take care of this, - * but there are times we have to free references immediately, see: T44376 + * \param new_id may be NULL to unlink \a old_id. */ -void ED_spacedata_id_unref(struct SpaceLink *sl, const ID *id) +void ED_spacedata_id_remap(struct ScrArea *sa, struct SpaceLink *sl, ID *old_id, ID *new_id) { + SpaceType *st = BKE_spacetype_from_id(sl->spacetype); - switch (sl->spacetype) { - case SPACE_OUTLINER: - ED_outliner_id_unref((SpaceOops *)sl, id); - break; - case SPACE_BUTS: - ED_buttons_id_unref((SpaceButs *)sl, id); - break; - case SPACE_NODE: - ED_node_id_unref((SpaceNode *)sl, id); - break; + if (st && st->id_remap) { + st->id_remap(sa, sl, old_id, new_id); } } |