Assembly: Auto close on deleted doc for dialogs to avoid segfaults
Currently if we close document on Assembly WB while having dialog opened, it will throw segfault because it is not being auto closed automatically during document close. This in turn resulted in dialog having dangling references to document that was no longer existing, throwing segfaults in random places. So solution is simple - add `setAutoCloseOnDeletedDocument` for every dialog in Assembly to avoid this situation and close every dialog upon document close.
This commit is contained in:
@@ -1004,6 +1004,7 @@ class ViewProviderJoint:
|
||||
dialog = Gui.Control.showDialog(panel)
|
||||
if dialog is not None:
|
||||
dialog.setAutoCloseOnTransactionChange(True)
|
||||
dialog.setAutoCloseOnDeletedDocument(True)
|
||||
dialog.setDocumentName(App.ActiveDocument.Name)
|
||||
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user