0000979: Move windows with their host wall

This commit is contained in:
Yorik van Havre
2013-04-19 18:46:24 -03:00
parent bbed835d6f
commit f2eaa0b9f9
2 changed files with 18 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ __title__="FreeCAD Arch Component"
__author__ = "Yorik van Havre"
__url__ = "http://free-cad.sourceforge.net"
import FreeCAD,FreeCADGui
import FreeCAD,FreeCADGui,Draft
from PyQt4 import QtGui,QtCore
from DraftTools import translate
@@ -101,7 +101,8 @@ def removeFromComponent(compobject,subobject):
l = compobject.Subtractions
l.append(subobject)
compobject.Subtractions = l
subobject.ViewObject.hide()
if Draft.getType(subobject) != "Window":
subobject.ViewObject.hide()
class ComponentTaskPanel:
@@ -306,7 +307,8 @@ class Component:
if prop in ["Additions","Subtractions"]:
if hasattr(obj,prop):
for o in getattr(obj,prop):
o.ViewObject.hide()
if Draft.getType(o) != "Window":
o.ViewObject.hide()
def processSubShapes(self,obj,base):
"Adds additions and subtractions to a base shape"