diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-21 21:29:07 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-21 21:30:19 +0100 |
commit | bc3995be18d2734d2fdb57d42741d6ad1e27b0a5 (patch) | |
tree | cf18bf5642e75f317e0d9efdf15a5274864f86e5 /gui | |
parent | a652bf3333365c9b306361d4819262a95390bbcc (diff) |
Revert "gui/main-window: hopefully prevent rare race on close"
It doesn't cancel the settings when closing the module's dialog.
This reverts commit f575f6402fc4e79e2d12c2bc897b616f112af4d9.
Diffstat (limited to 'gui')
-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; } |