ExplodeArray: fix no unhide array when deleting children
This commit is contained in:
parent
0bb50c0d8b
commit
8161252589
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user