diff --git a/lattice2PopulateChildren.py b/lattice2PopulateChildren.py index 5967c24..efcd6ad 100644 --- a/lattice2PopulateChildren.py +++ b/lattice2PopulateChildren.py @@ -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)") diff --git a/lattice2PopulateCopies.py b/lattice2PopulateCopies.py index 49d6d5c..df996dd 100644 --- a/lattice2PopulateCopies.py +++ b/lattice2PopulateCopies.py @@ -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)")