diff options
-rw-r--r-- | gui/main-window.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/main-window.cpp b/gui/main-window.cpp index d48e0b44..cd35d3cf 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -617,6 +617,13 @@ bool mk_dialog(mem<dylib> lib, ptr<t>& d) return nullptr; }); + if (just_created) + { + using plugin_api::detail::BaseDialog; + QObject::connect(static_cast<BaseDialog*>(d.get()), &BaseDialog::closing, + qApp->instance(), [&d]() { d = nullptr; }); + } + return just_created; } |