From b11ed19f8d8a658817829df8c3223a24a660afbb Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Thu, 25 Oct 2018 12:13:16 -0300 Subject: [PATCH] Arch: Make section planes claim their children in the tree --- src/Mod/Arch/ArchSectionPlane.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 4f85564009..42d736237d 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -530,7 +530,6 @@ class _ViewProviderSectionPlane: if not "CutMargin" in pl: vobj.addProperty("App::PropertyLength","CutMargin","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The distance between the cut plane and the actual view cut (keep this a very small value but not zero)")) vobj.CutMargin = 1 - self.Object = vobj.Object def onDocumentRestored(self,vobj): @@ -542,11 +541,14 @@ class _ViewProviderSectionPlane: return ":/icons/Arch_SectionPlane_Tree.svg" def claimChildren(self): - + if hasattr(self,"Object") and hasattr(self.Object,"Objects"): + return self.Object.Objects + print("claiming children, but none!") return [] def attach(self,vobj): + self.Object = vobj.Object self.clip = None self.mat1 = coin.SoMaterial() self.mat2 = coin.SoMaterial()