Fix T76883: Zero users scenes after undo.
Some tags need to be preserved when we reuse existing ID entirely. AFAICT, currently this is only the EXTRAUSER one.
This commit is contained in:
parent
db6e267bfc
commit
3360db83c4
Notes:
blender-bot
2023-02-14 03:13:26 +01:00
Referenced by issue #76883, Zero users scenes after undo
|
@ -9539,7 +9539,8 @@ static void read_libblock_undo_restore_identical(
|
|||
BLI_assert((fd->skip_flags & BLO_READ_SKIP_UNDO_OLD_MAIN) == 0);
|
||||
BLI_assert(id_old != NULL);
|
||||
|
||||
id_old->tag = tag;
|
||||
/* Some tags need to be preserved here. */
|
||||
id_old->tag = tag | (id_old->tag & LIB_TAG_EXTRAUSER);
|
||||
id_old->lib = main->curlib;
|
||||
id_old->us = ID_FAKE_USERS(id_old);
|
||||
/* Do not reset id->icon_id here, memory allocated for it remains valid. */
|
||||
|
|
Loading…
Reference in New Issue