From 8ba976078b26dd1dbf17e2402f5add181f5ad217 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 6 Jul 2023 11:45:01 +1000 Subject: [PATCH] Fix #3382. Minor regression in wall join refactor from d64c135 --- .../blenderbim/bim/module/model/wall.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/model/wall.py b/src/blenderbim/blenderbim/bim/module/model/wall.py index fcd0704b43..aa94348596 100644 --- a/src/blenderbim/blenderbim/bim/module/model/wall.py +++ b/src/blenderbim/blenderbim/bim/module/model/wall.py @@ -77,14 +77,15 @@ class JoinWall(bpy.types.Operator, tool.Ifc.Operator): return {"FINISHED"} if self.join_type in ("L", "V"): - if len(selected_objs) == 2: - another_selected_object = next(o for o in selected_objs if o != context.active_object) - if self.join_type == "L": - joiner.join_L(another_selected_object, context.active_object) - elif self.join_type == "V": - joiner.join_V(another_selected_object, context.active_object) - self.report({"ERROR"}, f"It requires 2 selected objects to do join of type {self.join_type}") - return {"CANCELLED"} + if len(selected_objs) != 2: + self.report({"ERROR"}, f"It requires 2 selected objects to do join of type {self.join_type}") + return {"CANCELLED"} + another_selected_object = next(o for o in selected_objs if o != context.active_object) + if self.join_type == "L": + joiner.join_L(another_selected_object, context.active_object) + elif self.join_type == "V": + joiner.join_V(another_selected_object, context.active_object) + return {"FINISHED"} if self.join_type == "T": elements = [tool.Ifc.get_entity(o) for o in context.selected_objects]