BIM: close BIM_Library task panel on doc close
Fixes #21179. This PR uses the built-in solution to close the task panel. I was not aware of this feature before. My 2 previous PRs related to the closing of task panels, #20719 and #21073, will (largely) have to be reverted/redone in favor of this solution.
This commit is contained in:
@@ -105,7 +105,9 @@ class BIM_Library:
|
||||
# save file paths with forward slashes even on windows
|
||||
pr.SetString("destination", addondir.replace("\\", "/"))
|
||||
libok = True
|
||||
FreeCADGui.Control.showDialog(BIM_Library_TaskPanel(offlinemode=libok))
|
||||
task = FreeCADGui.Control.showDialog(BIM_Library_TaskPanel(offlinemode=libok))
|
||||
task.setDocumentName(FreeCAD.ActiveDocument.Name)
|
||||
task.setAutoCloseOnDeletedDocument(True)
|
||||
|
||||
|
||||
class BIM_Library_TaskPanel:
|
||||
|
||||
Reference in New Issue
Block a user