diff options
author | Antonis Ryakiotakis <kalast@gmail.com> | 2022-02-07 21:37:15 +0300 |
---|---|---|
committer | Antonis Ryakiotakis <kalast@gmail.com> | 2022-02-07 21:37:15 +0300 |
commit | d8c05502272990173381bfd2590884bbc95aa5f5 (patch) | |
tree | 8bd65efacbe6484b838d4550597d0f4a54ddddd9 /source/blender/editors/space_text/space_text.c | |
parent | b64d551f3b2fa409b4eeefb641fc581eb6cd0bd6 (diff) | |
parent | fe1816f67fbc6aaf383ec77847d668367335d093 (diff) |
Merge branch 'master' into KTX_supportKTX_support
Diffstat (limited to 'source/blender/editors/space_text/space_text.c')
-rw-r--r-- | source/blender/editors/space_text/space_text.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index f449ce50ae3..7339d8248c8 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -32,6 +32,7 @@ #include "BKE_context.h" #include "BKE_global.h" #include "BKE_lib_id.h" +#include "BKE_lib_remap.h" #include "BKE_screen.h" #include "ED_screen.h" @@ -401,18 +402,12 @@ static void text_properties_region_draw(const bContext *C, ARegion *region) } } -static void text_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id) +static void text_id_remap(ScrArea *UNUSED(area), + SpaceLink *slink, + const struct IDRemapper *mappings) { SpaceText *stext = (SpaceText *)slink; - - if (!ELEM(GS(old_id->name), ID_TXT)) { - return; - } - - if ((ID *)stext->text == old_id) { - stext->text = (Text *)new_id; - id_us_ensure_real(new_id); - } + BKE_id_remapper_apply(mappings, (ID **)&stext->text, ID_REMAP_APPLY_ENSURE_REAL); } /********************* registration ********************/ |