Populate tools: tweak visibility logic

This commit is contained in:
DeepSOIC 2015-12-16 03:03:42 +03:00
parent 797c7f4c5e
commit a792d92442
2 changed files with 8 additions and 6 deletions

View File

@ -176,9 +176,10 @@ def CreateLatticePopulateChildren(name, label, shapeObj, latticeObjFrom, lattice
#hide something
if (refmode != "Origin" and refmode != "Use PlacementsFrom") or lattice2BaseFeature.isObjectLattice(shapeObj):
FreeCADGui.doCommand("f.Object.ViewObject.hide()")
FreeCADGui.doCommand("f.PlacementsTo.ViewObject.hide()")
if latticeObjFrom is not None:
FreeCADGui.doCommand("f.PlacementsFrom.ViewObject.hide()")
if lattice2BaseFeature.isObjectLattice(shapeObj):
FreeCADGui.doCommand("f.PlacementsTo.ViewObject.hide()")
if latticeObjFrom is not None:
FreeCADGui.doCommand("f.PlacementsFrom.ViewObject.hide()")
#finalize
FreeCADGui.doCommand("Gui.Selection.addSelection(f)")

View File

@ -177,9 +177,10 @@ def CreateLatticePopulateCopies(name, label, shapeObj, latticeObjFrom, latticeOb
#hide something
if (refmode != "Origin" and refmode != "Use PlacementsFrom") or lattice2BaseFeature.isObjectLattice(shapeObj):
FreeCADGui.doCommand("f.Object.ViewObject.hide()")
FreeCADGui.doCommand("f.PlacementsTo.ViewObject.hide()")
if latticeObjFrom is not None:
FreeCADGui.doCommand("f.PlacementsFrom.ViewObject.hide()")
if lattice2BaseFeature.isObjectLattice(shapeObj):
FreeCADGui.doCommand("f.PlacementsTo.ViewObject.hide()")
if latticeObjFrom is not None:
FreeCADGui.doCommand("f.PlacementsFrom.ViewObject.hide()")
#finalize
FreeCADGui.doCommand("Gui.Selection.addSelection(f)")