From 5733966843ac703b4506248563742db7a6d05195 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 22 Oct 2020 20:25:31 +0200 Subject: [PATCH] Dont reset settingspage changed status when window is shown This is done by Init in Load() when the settings is opened. --- src/settings/settingspage.cpp | 8 -------- src/settings/settingspage.h | 3 --- 2 files changed, 11 deletions(-) diff --git a/src/settings/settingspage.cpp b/src/settings/settingspage.cpp index 6416cfb6a..6aaa111be 100644 --- a/src/settings/settingspage.cpp +++ b/src/settings/settingspage.cpp @@ -34,14 +34,6 @@ SettingsPage::SettingsPage(SettingsDialog *dialog) : QWidget(dialog), dialog_(dialog), ui_widget_(nullptr), changed_(false) {} -void SettingsPage::showEvent(QShowEvent *e) { - - changed_ = false; - - QWidget::showEvent(e); - -} - void SettingsPage::Init(QWidget *ui_widget) { if (!ui_widget) return; diff --git a/src/settings/settingspage.h b/src/settings/settingspage.h index 230614fb6..f1cd3ac2b 100644 --- a/src/settings/settingspage.h +++ b/src/settings/settingspage.h @@ -65,9 +65,6 @@ class SettingsPage : public QWidget { void set_changed() { changed_ = true; } - protected: - void showEvent(QShowEvent *e) override; - private: virtual void Save() = 0; virtual void Cancel() {}