Fix #4203. Fix bug where removing nested cost items left orphaned relationships.

This commit is contained in:
Dion Moult
2024-01-12 18:14:49 +11:00
parent 75dd4f3132
commit 8df40dc4a6
10 changed files with 198 additions and 13 deletions
@@ -37,12 +37,10 @@ class AddCostSchedule(bpy.types.Operator, tool.Ifc.Operator):
object_type: bpy.props.StringProperty()
def _execute(self, context):
core.add_cost_schedule(
tool.Ifc,
name=self.name,
predefined_type=context.scene.BIMCostProperties.cost_schedule_predefined_types,
object_type=self.object_type,
)
predefined_type = context.scene.BIMCostProperties.cost_schedule_predefined_types
if predefined_type == "USERDEFINED":
predefined_type = self.object_type
core.add_cost_schedule(tool.Ifc, name=self.name, predefined_type=predefined_type)
def draw(self, context):
layout = self.layout
+2 -2
View File
@@ -1,5 +1,5 @@
def add_cost_schedule(ifc, name, predefined_type, object_type):
ifc.run("cost.add_cost_schedule", name=name, predefined_type=predefined_type, object_type=object_type)
def add_cost_schedule(ifc, name, predefined_type):
ifc.run("cost.add_cost_schedule", name=name, predefined_type=predefined_type)
def edit_cost_schedule(ifc, cost, cost_schedule):