Updating either a duration, start, or finish date for a task now auto-updates the other attribute

This commit is contained in:
Dion Moult
2021-05-31 12:42:02 +10:00
parent c041dd13ad
commit 452631b997
2 changed files with 43 additions and 17 deletions
@@ -104,6 +104,7 @@ def updateTaskTimeDateTime(self, context, startfinish):
**{"task_time": task_time, "attributes": {startfinish_key: startfinish_datetime}},
)
Data.load(IfcStore.get_file())
bpy.ops.bim.load_task_properties(task=props.active_task_id)
setattr(self, startfinish, canonicalise_time(startfinish_datetime))
@@ -127,6 +128,7 @@ def updateTaskduration(self, context):
if props.active_task_id == self.ifc_definition_id:
attribute = props.task_attributes.get("Duration")
attribute.string_value = self.duration
bpy.ops.bim.load_task_properties(task=props.active_task_id)
def updateVisualisationStart(self, context):