From d3ffafd227ab99e8673ea3edcf31de9b9e69fffa Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 26 Jan 2022 12:27:21 +0100 Subject: api: don't close a dialog that's already being closed --- api/plugin-api.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp index 3bf4b37b..6a43b55d 100644 --- a/api/plugin-api.cpp +++ b/api/plugin-api.cpp @@ -1,16 +1,15 @@ #include "plugin-api.hpp" +#include #include namespace plugin_api::detail { BaseDialog::BaseDialog() = default; -void BaseDialog::closeEvent(QCloseEvent*) +void BaseDialog::closeEvent(QCloseEvent* e) { if (isVisible()) - { emit closing(); - reject(); - } + e->accept(); } void BaseDialog::done(int) -- cgit v1.2.3