summaryrefslogtreecommitdiffhomepage
path: root/gui/main-window.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-21 21:29:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-21 21:30:19 +0100
commitbc3995be18d2734d2fdb57d42741d6ad1e27b0a5 (patch)
treecf18bf5642e75f317e0d9efdf15a5274864f86e5 /gui/main-window.cpp
parenta652bf3333365c9b306361d4819262a95390bbcc (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/main-window.cpp')
-rw-r--r--gui/main-window.cpp7
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;
}