ExplodeArray: fix no unhide array when deleting children

This commit is contained in:
DeepSOIC 2015-11-14 16:38:55 +03:00
parent 0bb50c0d8b
commit 8161252589

View File

@ -245,11 +245,14 @@ class ViewProviderLatticeFeature:
def onDelete(self, feature, subelements): # subelements is a tuple of strings def onDelete(self, feature, subelements): # subelements is a tuple of strings
try: try:
children = self.claimChildren() if hasattr(self.ViewObject,"DontUnhideOnDelete") and self.ViewObject.DontUnhideOnDelete:
if children and len(children) > 0: pass
marker = latticeMarkers else:
for child in children: children = self.claimChildren()
child.ViewObject.show() if children and len(children) > 0:
marker = latticeMarkers
for child in children:
child.ViewObject.show()
except Exception as err: except Exception as err:
# catch all exceptions, because we don't want to prevent deletion if something goes wrong # catch all exceptions, because we don't want to prevent deletion if something goes wrong
FreeCAD.Console.PrintError("Error in onDelete: " + err.message) FreeCAD.Console.PrintError("Error in onDelete: " + err.message)