Fix #121310: Marking or clearing 'Fake User' on ID not undoable.

Remapping of internal ID pointers in 'undo swap' case (i.e. when new ID
data had to be read from undo buffer, but current ID address is kept)
needs to also ignore 'fake user' handling, otherwise it would reverse
the undoing effect.
This commit is contained in:
Bastien Montagne
2024-05-03 12:51:05 +02:00
parent 1db538683d
commit 24560b6016

View File

@@ -2758,7 +2758,8 @@ static void read_libblock_undo_restore_at_old_address(FileData *fd, Main *main,
id_old,
true,
(ID_REMAP_NO_ORIG_POINTERS_ACCESS | ID_REMAP_SKIP_NEVER_NULL_USAGE |
ID_REMAP_SKIP_UPDATE_TAGGING | ID_REMAP_SKIP_USER_REFCOUNT));
ID_REMAP_SKIP_UPDATE_TAGGING | ID_REMAP_SKIP_USER_REFCOUNT |
ID_REMAP_SKIP_USER_CLEAR));
/* Special temporary usage of this pointer, necessary for the `undo_preserve` call after
* lib-linking to restore some data that should never be affected by undo, e.g. the 3D cursor of