Dont reset settingspage changed status when window is shown
This is done by Init in Load() when the settings is opened.
This commit is contained in:
@@ -34,14 +34,6 @@
|
|||||||
|
|
||||||
SettingsPage::SettingsPage(SettingsDialog *dialog) : QWidget(dialog), dialog_(dialog), ui_widget_(nullptr), changed_(false) {}
|
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) {
|
void SettingsPage::Init(QWidget *ui_widget) {
|
||||||
|
|
||||||
if (!ui_widget) return;
|
if (!ui_widget) return;
|
||||||
|
|||||||
@@ -65,9 +65,6 @@ class SettingsPage : public QWidget {
|
|||||||
|
|
||||||
void set_changed() { changed_ = true; }
|
void set_changed() { changed_ = true; }
|
||||||
|
|
||||||
protected:
|
|
||||||
void showEvent(QShowEvent *e) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void Save() = 0;
|
virtual void Save() = 0;
|
||||||
virtual void Cancel() {}
|
virtual void Cancel() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user