mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
Add to recent projects when project is saved
This commit is contained in:
@@ -1320,6 +1320,8 @@ class ExportIFCBase:
|
|||||||
ifc_exporter.export()
|
ifc_exporter.export()
|
||||||
settings.logger.info("Export finished in {:.2f} seconds".format(time.time() - start))
|
settings.logger.info("Export finished in {:.2f} seconds".format(time.time() - start))
|
||||||
print("Export finished in {:.2f} seconds".format(time.time() - start))
|
print("Export finished in {:.2f} seconds".format(time.time() - start))
|
||||||
|
# New project created in Bonsai should be in recent projects too.
|
||||||
|
tool.Project.add_recent_ifc_project(Path(output_file))
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
if not scene.DocProperties.ifc_files:
|
if not scene.DocProperties.ifc_files:
|
||||||
new = scene.DocProperties.ifc_files.add()
|
new = scene.DocProperties.ifc_files.add()
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ class Project(bonsai.core.tool.Project):
|
|||||||
|
|
||||||
If `filepath` was opened before, bump it in the list.
|
If `filepath` was opened before, bump it in the list.
|
||||||
"""
|
"""
|
||||||
|
filepath = filepath.absolute()
|
||||||
current_filepaths = cls.get_recent_ifc_projects()
|
current_filepaths = cls.get_recent_ifc_projects()
|
||||||
if filepath in current_filepaths:
|
if filepath in current_filepaths:
|
||||||
current_filepaths.remove(filepath)
|
current_filepaths.remove(filepath)
|
||||||
|
|||||||
Reference in New Issue
Block a user