BIM: Fix save tool - fixes #15362

This commit is contained in:
Yorik van Havre
2024-07-11 11:16:46 +02:00
committed by Yorik van Havre
parent d282d449b9
commit d3fbb0e027

View File

@@ -199,12 +199,15 @@ class IFC_Save:
from nativeifc import ifc_tools # lazy loading
doc = FreeCAD.ActiveDocument
ifc_tools.save(doc)
gdoc = FreeCADGui.getDocument(doc.Name)
try:
gdoc.Modified = False
except:
pass
if getattr(doc, "IfcFilePath", None):
ifc_tools.save(doc)
gdoc = FreeCADGui.getDocument(doc.Name)
try:
gdoc.Modified = False
except:
pass
else:
FreeCADGui.runCommand("IFC_SaveAs")
class IFC_SaveAs: