diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 3d60f6d..aee8ffd 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -10,4 +10,5 @@ build: only: refs: - master - - develop \ No newline at end of file + - develop + - 132-fix-undo-edit-last-operation-redo-handling-2 \ No newline at end of file diff --git a/multi_user/bl_types/bl_datablock.py b/multi_user/bl_types/bl_datablock.py index 85935cd..d2e36fd 100644 --- a/multi_user/bl_types/bl_datablock.py +++ b/multi_user/bl_types/bl_datablock.py @@ -147,8 +147,12 @@ class BlDatablock(ReplicatedDatablock): name = self.data.get('name') logging.debug(f"Constructing {name}") datablock_ref = self._construct(data=self.data) - for i in range(bpy.context.preferences.edit.undo_steps+1): - bpy.ops.ed.undo_push(message="Multiuser history flush") + + try: + for i in range(bpy.context.preferences.edit.undo_steps+1): + bpy.ops.ed.undo_push(message="Multiuser history flush") + except RuntimeError: + logging.error("Fail to overwrite history") if datablock_ref is not None: setattr(datablock_ref, 'uuid', self.uuid)