summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--api/plugin-api.cpp6
-rw-r--r--gui/options-dialog.cpp3
2 files changed, 5 insertions, 4 deletions
diff --git a/api/plugin-api.cpp b/api/plugin-api.cpp
index 5c83e42f..ef9e47a1 100644
--- a/api/plugin-api.cpp
+++ b/api/plugin-api.cpp
@@ -1,4 +1,5 @@
#include "plugin-api.hpp"
+#include <QDebug>
namespace plugin_api::detail {
@@ -7,18 +8,15 @@ void BaseDialog::closeEvent(QCloseEvent*)
{
if (isVisible())
{
- hide();
emit closing();
+ close();
}
}
void BaseDialog::done(int)
{
if (isVisible())
- {
- hide();
close();
- }
}
bool BaseDialog::embeddable() noexcept { return false; }
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index d1769ea8..ac4117bc 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -179,9 +179,12 @@ options_dialog::options_dialog(std::unique_ptr<ITrackerDialog>& tracker_dialog_,
auto add_module_tab = [this] (auto& place, auto&& dlg, const QString& label) {
if (dlg && dlg->embeddable())
{
+ using BaseDialog = plugin_api::detail::BaseDialog;
+
dlg->set_buttons_visible(false);
place = dlg.release();
ui.tabWidget->addTab(place, label);
+ QObject::connect(place, &BaseDialog::closing, this, &QDialog::close);
}
};