BIM: Arch_Fence add missing recompute

This commit is contained in:
Roy-043
2024-07-15 17:16:32 +02:00
committed by Yorik van Havre
parent f54c5f21db
commit c244d1b56f

View File

@@ -48,13 +48,14 @@ class Arch_Fence:
if len(FreeCADGui.Selection.getSelection()) != 3:
FreeCAD.Console.PrintError(translate('Arch Fence selection','Select a section, post and path in exactly this order to build a fence.')+"\n")
return
FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Fence"))
doc = FreeCAD.ActiveDocument
doc.openTransaction(translate("Arch","Create Fence"))
FreeCADGui.addModule("Arch")
FreeCADGui.doCommand("section = FreeCADGui.Selection.getSelection()[0]")
FreeCADGui.doCommand("post = FreeCADGui.Selection.getSelection()[1]")
FreeCADGui.doCommand("path = FreeCADGui.Selection.getSelection()[2]")
FreeCADGui.doCommand("Arch.makeFence(section, post, path)")
FreeCAD.ActiveDocument.commitTransaction()
doc.commitTransaction()
doc.recompute()
FreeCADGui.addCommand('Arch_Fence', Arch_Fence())