From bc3995be18d2734d2fdb57d42741d6ad1e27b0a5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 21 Feb 2017 21:29:07 +0100 Subject: 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. --- gui/main-window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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 lib, ptr& d) return nullptr; }); + if (just_created) + { + using plugin_api::detail::BaseDialog; + QObject::connect(static_cast(d.get()), &BaseDialog::closing, + qApp->instance(), [&d]() { d = nullptr; }); + } + return just_created; } -- cgit v1.2.3