From c6e03d2aa49de9fccab089a8ee89285a66954eaa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 3 Aug 2024 08:28:16 -0400 Subject: [PATCH] disable re-indent on return by default --- tools/lammps-gui/lammpsgui.cpp | 5 +++-- tools/lammps-gui/preferences.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/lammps-gui/lammpsgui.cpp b/tools/lammps-gui/lammpsgui.cpp index 983c79fa7b6..1d29e602222 100644 --- a/tools/lammps-gui/lammpsgui.cpp +++ b/tools/lammps-gui/lammpsgui.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -355,7 +356,7 @@ LammpsGui::LammpsGui(QWidget *parent, const char *filename) : #undef ADD_STYLES settings.beginGroup("reformat"); - ui->textEdit->setReformatOnReturn(settings.value("return", true).toBool()); + ui->textEdit->setReformatOnReturn(settings.value("return", false).toBool()); ui->textEdit->setAutoComplete(settings.value("automatic", true).toBool()); settings.endGroup(); } @@ -1395,7 +1396,7 @@ void LammpsGui::preferences() } if (imagewindow) imagewindow->createImage(); settings.beginGroup("reformat"); - ui->textEdit->setReformatOnReturn(settings.value("return", true).toBool()); + ui->textEdit->setReformatOnReturn(settings.value("return", false).toBool()); ui->textEdit->setAutoComplete(settings.value("automatic", true).toBool()); settings.endGroup(); } diff --git a/tools/lammps-gui/preferences.cpp b/tools/lammps-gui/preferences.cpp index b601a9995f0..3c3d27d97eb 100644 --- a/tools/lammps-gui/preferences.cpp +++ b/tools/lammps-gui/preferences.cpp @@ -554,7 +554,7 @@ EditorTab::EditorTab(QSettings *_settings, QWidget *parent) : QWidget(parent), s nameval->setRange(1, 32); nameval->setValue(settings->value("name", "8").toInt()); nameval->setObjectName("nameval"); - retval->setCheckState(settings->value("return", true).toBool() ? Qt::Checked : Qt::Unchecked); + retval->setCheckState(settings->value("return", false).toBool() ? Qt::Checked : Qt::Unchecked); retval->setObjectName("retval"); autoval->setCheckState(settings->value("automatic", true).toBool() ? Qt::Checked : Qt::Unchecked);