Core: Enable TaskDialogs to associate view (#17373)
* Core: Add possibility for task dialogs to associate a view and be able to close when associated view is closed. * TaskImage: Use task dialog view association. * Sketcher: Use task dialog view association. Preventing crash (https://github.com/FreeCAD/FreeCAD/issues/16702) * EditableDatumLabel: Use QPointer to prevent crash
This commit is contained in:
@@ -209,6 +209,8 @@ void MDIView::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
if (canClose()) {
|
||||
e->accept();
|
||||
Application::Instance->viewClosed(this);
|
||||
|
||||
if (!bIsPassive) {
|
||||
// must be detached so that the last view can get asked
|
||||
Document* doc = this->getGuiDocument();
|
||||
|
||||
Reference in New Issue
Block a user