From 2b1c0d7751fa4582883d5ac6af4e917730326c84 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Wed, 6 Dec 2023 07:58:01 +0100 Subject: [PATCH] clang-format --- GUI/View/Numeric/DoubleSpinBox.cpp | 5 ++--- GUI/View/Numeric/DoubleSpinBox.h | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/GUI/View/Numeric/DoubleSpinBox.cpp b/GUI/View/Numeric/DoubleSpinBox.cpp index 42e4e43a581..a5385ba24af 100644 --- a/GUI/View/Numeric/DoubleSpinBox.cpp +++ b/GUI/View/Numeric/DoubleSpinBox.cpp @@ -28,7 +28,7 @@ QString toString(double val, int decimal_points = 4) // TODO merge with other to return "0"; QString result = (val >= 10000 || val < 0.1) ? QString::number(val, 'e', decimal_points) - : QString::number(val, 'f', decimal_points); + : QString::number(val, 'f', decimal_points); // suppress ".0" in mantissa; normalize exponent return result.replace(QRegularExpression("(\\.?0+)?((e)([\\+]?)([-]?)(0*)([1-9].*))?$"), @@ -71,11 +71,10 @@ void DoubleSpinBox::wheelEvent(QWheelEvent* event) void DoubleSpinBox::stepBy(int steps) { - if (steps>0) + if (steps > 0) setValue(m_valueProperty * 1.2); else setValue(m_valueProperty / 1.2); - } void DoubleSpinBox::onDisplayValueChanged() diff --git a/GUI/View/Numeric/DoubleSpinBox.h b/GUI/View/Numeric/DoubleSpinBox.h index 7e7bd48a420..509491039a4 100644 --- a/GUI/View/Numeric/DoubleSpinBox.h +++ b/GUI/View/Numeric/DoubleSpinBox.h @@ -43,7 +43,9 @@ signals: private: QAbstractSpinBox::StepEnabled stepEnabled() const override - { return StepUpEnabled | StepDownEnabled; } + { + return StepUpEnabled | StepDownEnabled; + } void setValue(double val); void wheelEvent(QWheelEvent* event) override; void stepBy(int steps) override; -- GitLab