Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Commit

Permalink
Fix apply button on settings window
Browse files Browse the repository at this point in the history
  • Loading branch information
weslly committed Jun 28, 2017
1 parent 0359c18 commit 2822f5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,10 @@ MainWindow::MainWindow()
SLOT(databaseStatusChanged(DatabaseWidget*)));
connect(m_ui->stackedWidget, SIGNAL(currentChanged(int)), SLOT(setMenuActionState()));
connect(m_ui->stackedWidget, SIGNAL(currentChanged(int)), SLOT(updateWindowTitle()));
connect(m_ui->settingsWidget, SIGNAL(editFinished(bool)), SLOT(switchToDatabases()));
connect(m_ui->settingsWidget, SIGNAL(accepted()), SLOT(applySettingsChanges()));
connect(m_ui->settingsWidget, SIGNAL(apply()), SLOT(applySettingsChanges()));
connect(m_ui->settingsWidget, SIGNAL(accepted()), SLOT(switchToDatabases()));
connect(m_ui->settingsWidget, SIGNAL(rejected()), SLOT(switchToDatabases()));

connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), m_ui->tabWidget,
SLOT(newDatabase()));
Expand Down
4 changes: 1 addition & 3 deletions src/gui/SettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
}

connect(this, SIGNAL(accepted()), SLOT(saveSettings()));
connect(this, SIGNAL(apply()), SLOT(saveSettings()));
connect(this, SIGNAL(rejected()), SLOT(reject()));

connect(m_generalUi->autoSaveAfterEveryChangeCheckBox, SIGNAL(toggled(bool)),
Expand Down Expand Up @@ -213,8 +214,6 @@ void SettingsWidget::saveSettings()
for (const ExtraPage& page: asConst(m_extraPages)) {
page.saveSettings();
}

emit editFinished(true);
}

void SettingsWidget::reject()
Expand All @@ -224,7 +223,6 @@ void SettingsWidget::reject()
autoType()->registerGlobalShortcut(m_globalAutoTypeKey, m_globalAutoTypeModifiers);
}

emit editFinished(false);
}

void SettingsWidget::enableAutoSaveOnExit(bool checked)
Expand Down
3 changes: 0 additions & 3 deletions src/gui/SettingsWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class SettingsWidget : public EditWidget
void addSettingsPage(ISettingsPage * page);
void loadSettings();

signals:
void editFinished(bool accepted);

private slots:
void saveSettings();
void reject();
Expand Down

0 comments on commit 2822f5f

Please sign in to comment.