BIM: Fixed lock button with no doc - Fixes #18191
This commit is contained in:
committed by
Chris Hennes
parent
a3a0d316b1
commit
da45328f6f
@@ -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")
|
||||
@@ -356,6 +358,8 @@ def lock_document():
|
||||
from PySide import QtCore
|
||||
|
||||
doc = FreeCAD.ActiveDocument
|
||||
if not doc:
|
||||
return
|
||||
products = []
|
||||
spatial = []
|
||||
ifcfile = None
|
||||
|
||||
Reference in New Issue
Block a user