mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Fix #2206. Bug where removing a cost item with active data created an error.
This commit is contained in:
@@ -239,6 +239,8 @@ class RemoveCostItem(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
contracted_cost_items.remove(props.active_cost_item_index)
|
contracted_cost_items.remove(props.active_cost_item_index)
|
||||||
props.contracted_cost_items = json.dumps(contracted_cost_items)
|
props.contracted_cost_items = json.dumps(contracted_cost_items)
|
||||||
bpy.ops.bim.enable_editing_cost_items(cost_schedule=props.active_cost_schedule_id)
|
bpy.ops.bim.enable_editing_cost_items(cost_schedule=props.active_cost_schedule_id)
|
||||||
|
if props.active_cost_item_id == self.cost_item:
|
||||||
|
props.active_cost_item_id = 0
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ def assign_work_schedule(ifc, sequence, work_plan=None, work_schedule=None):
|
|||||||
|
|
||||||
|
|
||||||
def unassign_work_schedule(ifc, work_plan=None, work_schedule=None):
|
def unassign_work_schedule(ifc, work_plan=None, work_schedule=None):
|
||||||
ifc.run("aggregate.unassign_object", relating_object=work_plan, product=work_schedule)
|
ifc.run("aggregate.unassign_object", product=work_schedule)
|
||||||
|
|
||||||
|
|
||||||
def enable_editing_work_schedule(sequence, work_schedule=None):
|
def enable_editing_work_schedule(sequence, work_schedule=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user