From 1749315eadc144a824f6d569a3a8123a1d840dc1 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 13 Sep 2016 20:06:25 -0300 Subject: [PATCH] Arch: fixed error message when restoring section planes --- src/Mod/Arch/ArchSectionPlane.py | 263 ++++++++++++++++--------------- 1 file changed, 132 insertions(+), 131 deletions(-) diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 798102d91..b249e7d1c 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -366,141 +366,142 @@ class _ArchDrawingView: import Part, DraftGeomUtils if hasattr(obj,"Source"): if obj.Source: - if obj.Source.Objects: - objs = Draft.getGroupContents(obj.Source.Objects,walls=True,addgroups=True) - if hasattr(obj,"AlwaysOn"): - if not obj.AlwaysOn: + if hasattr(obj.Source,"Objects"): + if obj.Source.Objects: + objs = Draft.getGroupContents(obj.Source.Objects,walls=True,addgroups=True) + if hasattr(obj,"AlwaysOn"): + if not obj.AlwaysOn: + objs = Draft.removeHidden(objs) + else: objs = Draft.removeHidden(objs) - else: - objs = Draft.removeHidden(objs) - # separate spaces - self.spaces = [] - os = [] - for o in objs: - if Draft.getType(o) == "Space": - self.spaces.append(o) - else: - os.append(o) - objs = os - self.svg = '' - fillpattern = '