From bdf1abacc773ccc91012e00d2ff6a1ff05407f8c Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Wed, 14 Aug 2019 21:39:52 +0200 Subject: [PATCH] Arch: make new property to use shape color instead of material color working for all Arch objs --- src/Mod/Arch/ArchFence.py | 3 +++ src/Mod/Arch/ArchPanel.py | 10 ++++++++++ src/Mod/Arch/ArchStructure.py | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/src/Mod/Arch/ArchFence.py b/src/Mod/Arch/ArchFence.py index be27634656..932fbc97a1 100644 --- a/src/Mod/Arch/ArchFence.py +++ b/src/Mod/Arch/ArchFence.py @@ -231,6 +231,9 @@ class _ViewProviderFence(ArchComponent.ViewProviderComponent): def __init__(self, vobj): ArchComponent.ViewProviderComponent.__init__(self, vobj) + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) self.setProperties(vobj) def setProperties(self, vobj): diff --git a/src/Mod/Arch/ArchPanel.py b/src/Mod/Arch/ArchPanel.py index 0fd10f0792..69ad150f24 100644 --- a/src/Mod/Arch/ArchPanel.py +++ b/src/Mod/Arch/ArchPanel.py @@ -825,6 +825,11 @@ class PanelView: def __init__(self, obj): obj.Proxy = self + + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) + self.setProperties(obj) obj.X = 10 obj.Y = 10 @@ -924,6 +929,11 @@ class PanelCut(Draft._DraftObject): def __init__(self, obj): Draft._DraftObject.__init__(self,obj) obj.Proxy = self + + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) + self.setProperties(obj) def setProperties(self,obj): diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index e553676aba..722ddedccd 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -896,6 +896,11 @@ class _ViewProviderStructure(ArchComponent.ViewProviderComponent): def __init__(self,vobj): ArchComponent.ViewProviderComponent.__init__(self,vobj) + + # setProperties of ArchComponent will be overwritten + # thus setProperties from ArchComponent will be explicit called to get the properties + ArchComponent.ViewProviderComponent.setProperties(self, vobj) + self.setProperties(vobj) vobj.ShapeColor = ArchCommands.getDefaultColor("Structure")