From efb9167c2eb8b609a8bc86c119b6a77e999681bf Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 19 Oct 2021 05:46:01 +0200 Subject: opentrack: defer destroying dialogs --- opentrack/main-window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opentrack/main-window.cpp b/opentrack/main-window.cpp index 4f6972f4..fb6d89c2 100644 --- a/opentrack/main-window.cpp +++ b/opentrack/main-window.cpp @@ -581,7 +581,7 @@ void main_window::show_tracker_settings() pTrackerDialog->register_tracker(work->libs.pTracker.get()); if (pTrackerDialog) QObject::connect(pTrackerDialog.get(), &ITrackerDialog::closing, - this, [this] { pTrackerDialog = nullptr; }); + this, [this] { QTimer::singleShot(0, [this] { pTrackerDialog = nullptr; }); }); } void main_window::show_proto_settings() @@ -590,7 +590,7 @@ void main_window::show_proto_settings() pProtocolDialog->register_protocol(work->libs.pProtocol.get()); if (pProtocolDialog) QObject::connect(pProtocolDialog.get(), &IProtocolDialog::closing, - this, [this] { pProtocolDialog = nullptr; }); + this, [this] { QTimer::singleShot(0, [this] { pProtocolDialog = nullptr; }); }); } void main_window::show_filter_settings() @@ -599,7 +599,7 @@ void main_window::show_filter_settings() pFilterDialog->register_filter(work->libs.pFilter.get()); if (pFilterDialog) QObject::connect(pFilterDialog.get(), &IFilterDialog::closing, - this, [this] { pFilterDialog = nullptr; }); + this, [this] { QTimer::singleShot(0, [this] { pFilterDialog = nullptr; }); }); } void main_window::show_options_dialog() -- cgit v1.2.3