Arch: Hide/show windows together with their parents - fixes #1733
This commit is contained in:
parent
9f7956b17e
commit
f1dffbb90e
|
@ -140,8 +140,6 @@ def removeComponents(objectsList,host=None):
|
||||||
for o in objectsList:
|
for o in objectsList:
|
||||||
if not o in s:
|
if not o in s:
|
||||||
s.append(o)
|
s.append(o)
|
||||||
if FreeCAD.GuiUp:
|
|
||||||
o.ViewObject.hide()
|
|
||||||
if Draft.getType(o) == "Window":
|
if Draft.getType(o) == "Window":
|
||||||
# fix for sketch-based windows
|
# fix for sketch-based windows
|
||||||
if o.Base:
|
if o.Base:
|
||||||
|
@ -158,7 +156,10 @@ def removeComponents(objectsList,host=None):
|
||||||
if o.Base.ExternalGeometry[i][0].Name == host.Name:
|
if o.Base.ExternalGeometry[i][0].Name == host.Name:
|
||||||
o.Base.delExternal(i)
|
o.Base.delExternal(i)
|
||||||
FreeCAD.Console.PrintMessage(translate("Arch","removing sketch support to avoid cross-referencing"))
|
FreeCAD.Console.PrintMessage(translate("Arch","removing sketch support to avoid cross-referencing"))
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
if FreeCAD.GuiUp:
|
||||||
|
o.ViewObject.hide()
|
||||||
host.Subtractions = s
|
host.Subtractions = s
|
||||||
else:
|
else:
|
||||||
for o in objectsList:
|
for o in objectsList:
|
||||||
|
|
|
@ -639,6 +639,10 @@ class ViewProviderComponent:
|
||||||
return
|
return
|
||||||
|
|
||||||
def onChanged(self,vobj,prop):
|
def onChanged(self,vobj,prop):
|
||||||
|
if prop == "Visibility":
|
||||||
|
for obj in vobj.Object.Additions+vobj.Object.Subtractions:
|
||||||
|
if Draft.getType(obj) == "Window":
|
||||||
|
obj.ViewObject.Visibility = vobj.Visibility
|
||||||
return
|
return
|
||||||
|
|
||||||
def attach(self,vobj):
|
def attach(self,vobj):
|
||||||
|
|
|
@ -392,7 +392,7 @@ class _CommandWindow:
|
||||||
self.FORMAT = DraftGui.makeFormatSpec(self.DECIMALS,'Length')
|
self.FORMAT = DraftGui.makeFormatSpec(self.DECIMALS,'Length')
|
||||||
|
|
||||||
# auto mode
|
# auto mode
|
||||||
if sel:
|
if sel and FreeCADGui.Selection.getSelectionEx():
|
||||||
obj = sel[0]
|
obj = sel[0]
|
||||||
if Draft.getType(obj) in AllowedHosts:
|
if Draft.getType(obj) in AllowedHosts:
|
||||||
# make sure only one face is selected
|
# make sure only one face is selected
|
||||||
|
|
Loading…
Reference in New Issue
Block a user