From a6fad36ab67fe92cccb48aa1e69b2d201a8a5522 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 12 May 2015 23:26:41 -0300 Subject: [PATCH] Arch: small bugfix in windows --- src/Mod/Arch/ArchWindow.py | 6 +++++- src/Mod/Draft/Draft.py | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index 8de0e9198..d0f89de16 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -176,7 +176,7 @@ def makeWindowPreset(windowtype,width,height,h1,h2,h3,w1,w2,o1,o2,placement=None if windowtype == "Fixed": wp = outerFrame(s,width,height,h1,w1,o1) - wp.extend(["Glass","Glass panel","Wire1",str(w1/gla),str(w1/2)]) + wp.extend(["Glass","Glass panel","Wire1",str(w1/gla),str(w1+w1/2)]) elif windowtype == "Open 1-pane": wp = outerFrame(s,width,height,h1,w1,o1) @@ -811,6 +811,10 @@ class _ViewProviderWindow(ArchComponent.ViewProviderComponent): def colorize(self,obj): "setting different part colors" + if hasattr(obj,"CloneOf"): + if obj.CloneOf: + obj.ViewObject.DiffuseColor = obj.CloneOf.ViewObject.DiffuseColor + return solids = obj.Shape.copy().Solids #print "Colorizing ", solids colors = [] diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 8518291a1..b6652aa46 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -597,7 +597,14 @@ def getMovableChildren(objectslist,recursive=False): for child in children: if hasattr(child,"MoveWithHost"): if child.MoveWithHost: - added.append(child) + if hasattr(obj,"CloneOf"): + if obj.CloneOf: + if obj.CloneOf.Name != child.Name: + added.append(child) + else: + added.append(child) + else: + added.append(child) if recursive: added.extend(getMovableChildren(children)) return added