From efbe9a543fa11f5d30073ff49aa962a30b8735e1 Mon Sep 17 00:00:00 2001 From: Massimo Fabbro Date: Thu, 12 Mar 2026 21:16:57 +0100 Subject: [PATCH] fix infinite recursion error previously there was an almost silent error because the update function was called every time. Now it should be fixed. --- src/bonsai/bonsai/tool/cost.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/cost.py b/src/bonsai/bonsai/tool/cost.py index bbec525ee9..fc07a629a6 100644 --- a/src/bonsai/bonsai/tool/cost.py +++ b/src/bonsai/bonsai/tool/cost.py @@ -987,7 +987,8 @@ class Cost(bonsai.core.tool.Cost): def disable_editing_cost_item_parent(cls) -> None: props = cls.get_cost_props() props.active_cost_item_id = 0 - props.change_cost_item_parent = False + if props.change_cost_item_parent == True: + props.change_cost_item_parent = False @classmethod def load_cost_item_quantities(cls, cost_item: Optional[ifcopenshell.entity_instance] = None) -> None: