mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Fix contracted cost item removal logic
It was removing checking for cost item index, though container is storing cost item ids.
This commit is contained in:
@@ -211,8 +211,8 @@ class Cost(bonsai.core.tool.Cost):
|
||||
cls.contracted_cost_items = json.loads(props.contracted_cost_items)
|
||||
if props.active_cost_item_id == cost_item_id:
|
||||
props.active_cost_item_id = 0
|
||||
if props.active_cost_item_index in cls.contracted_cost_items:
|
||||
cls.contracted_cost_items.remove(props.active_cost_item_index)
|
||||
if cost_item_id in cls.contracted_cost_items:
|
||||
cls.contracted_cost_items.remove(cost_item_id)
|
||||
props.contracted_cost_items = json.dumps(cls.contracted_cost_items)
|
||||
cls.enable_editing_cost_items(cost_schedule=tool.Ifc.get().by_id(props.active_cost_schedule_id))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user