diff --git a/src/blenderbim/blenderbim/bim/ifc.py b/src/blenderbim/blenderbim/bim/ifc.py index 1170ee37c5..8bed6f5e7c 100644 --- a/src/blenderbim/blenderbim/bim/ifc.py +++ b/src/blenderbim/blenderbim/bim/ifc.py @@ -232,6 +232,7 @@ class IfcStore: is_top_level_operator = not bool(IfcStore.current_transaction) if is_top_level_operator: + active_object = context.active_object IfcStore.begin_transaction(operator) IfcStore.get_file().begin_transaction() # This empty transaction ensures that each operator has at least one transaction @@ -247,6 +248,7 @@ class IfcStore: operator, rollback=lambda d: IfcStore.get_file().undo(), commit=lambda d: IfcStore.get_file().redo() ) IfcStore.end_transaction(operator) + context.view_layer.objects.active = active_object return result