Add check for updates setting

This commit is contained in:
GriffinR
2024-01-20 23:02:43 -05:00
parent d6dfab1805
commit 09c2ed6b30
6 changed files with 49 additions and 6 deletions

View File

@@ -49,6 +49,7 @@ void PreferenceEditor::updateFields() {
ui->lineEdit_TextEditorGotoLine->setText(porymapConfig.getTextEditorGotoLine());
ui->checkBox_MonitorProjectFiles->setChecked(porymapConfig.getMonitorFiles());
ui->checkBox_OpenRecentProject->setChecked(porymapConfig.getReopenOnLaunch());
ui->checkBox_CheckForUpdates->setChecked(porymapConfig.getCheckForUpdates());
}
void PreferenceEditor::saveFields() {
@@ -58,10 +59,14 @@ void PreferenceEditor::saveFields() {
emit themeChanged(theme);
}
porymapConfig.setSaveDisabled(true);
porymapConfig.setTextEditorOpenFolder(ui->lineEdit_TextEditorOpenFolder->text());
porymapConfig.setTextEditorGotoLine(ui->lineEdit_TextEditorGotoLine->text());
porymapConfig.setMonitorFiles(ui->checkBox_MonitorProjectFiles->isChecked());
porymapConfig.setReopenOnLaunch(ui->checkBox_OpenRecentProject->isChecked());
porymapConfig.setCheckForUpdates(ui->checkBox_CheckForUpdates->isChecked());
porymapConfig.setSaveDisabled(false);
porymapConfig.save();
emit preferencesSaved();
}