Skip to content

Commit

Permalink
BIM: Fixed lock button with no doc - Fixes FreeCAD#18191
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre authored and chennes committed Dec 6, 2024
1 parent a3a0d31 commit da45328
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mod/BIM/nativeifc/ifc_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ def unlock_document():
from nativeifc import ifc_tools # lazy loading

doc = FreeCAD.ActiveDocument
if not doc:
return
if "IfcFilePath" in doc.PropertiesList:
# this is a locked document
doc.openTransaction("Unlock document")
Expand Down Expand Up @@ -356,6 +358,8 @@ def lock_document():
from PySide import QtCore

doc = FreeCAD.ActiveDocument
if not doc:
return
products = []
spatial = []
ifcfile = None
Expand Down

0 comments on commit da45328

Please sign in to comment.