Part: Check geometry in Part_ExplodeCompound command

This commit is contained in:
marioalexis
2022-03-09 00:43:53 -03:00
committed by wwmayer
parent d1fc159f4c
commit 8723f0b96d
2 changed files with 12 additions and 3 deletions

View File

@@ -93,9 +93,9 @@ def cmdExplode():
FreeCADGui.doCommand("input_obj = App.ActiveDocument."+obj.Name)
FreeCADGui.doCommand("CompoundTools.Explode.explodeCompound(input_obj)")
FreeCADGui.doCommand("input_obj.ViewObject.hide()")
except Exception:
except Exception as ex:
FreeCAD.ActiveDocument.abortTransaction()
raise
FreeCAD.Console.PrintError("{}\n".format(ex))
FreeCAD.ActiveDocument.commitTransaction()
FreeCADGui.doCommand("App.ActiveDocument.recompute()")