From 17849c656e0e8f04dad972d19a49e5e9efac068a Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Mon, 17 Dec 2018 12:24:27 -0200 Subject: [PATCH] Arch: Fixed remaining bugs in Schedule - Fixes #3590 --- src/Mod/Arch/ArchSchedule.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchSchedule.py b/src/Mod/Arch/ArchSchedule.py index a4e1e66aa6..16a2d4a592 100644 --- a/src/Mod/Arch/ArchSchedule.py +++ b/src/Mod/Arch/ArchSchedule.py @@ -127,7 +127,7 @@ class _ArchSchedule: if objs: objs = objs.split(";") objs = [FreeCAD.ActiveDocument.getObject(o) for o in objs] - objs = [obj for obj in objs if obj != None] + objs = [o for o in objs if o != None] else: objs = FreeCAD.ActiveDocument.Objects if len(objs) == 1: @@ -136,6 +136,9 @@ class _ArchSchedule: objs = objs[0].Group objs = Draft.getGroupContents(objs,walls=True,addgroups=True) objs = Arch.pruneIncluded(objs,strict=True) + # remove the schedule object and its result from the list + objs = [o for o in objs if not o == obj] + objs = [o for o in objs if not o == obj.Result] if obj.Filter[i]: # apply filters nobjs = [] @@ -231,6 +234,7 @@ class _ArchSchedule: obj.Result.set("B"+str(i+2),str(val)) if verbose: print ("TOTAL:"+34*" "+str(val)) + obj.Result.recompute() def __getstate__(self): return self.Type