From a792d9244231cdabc2e3e5396be7ed6a05a5f711 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Wed, 16 Dec 2015 03:03:42 +0300 Subject: [PATCH] Populate tools: tweak visibility logic --- lattice2PopulateChildren.py | 7 ++++--- lattice2PopulateCopies.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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)")