diff --git a/GUI/View/Numeric/DoubleSpinBox.cpp b/GUI/View/Numeric/DoubleSpinBox.cpp index c05af8522d2ba73df88b402fd561052043043b73..eb6b067f54048e82c83e64ed17d5cf94e7178fb8 100644 --- a/GUI/View/Numeric/DoubleSpinBox.cpp +++ b/GUI/View/Numeric/DoubleSpinBox.cpp @@ -16,7 +16,7 @@ #include "GUI/View/Numeric/NumberUtil.h" #include <QWheelEvent> -DoubleSpinBox::DoubleSpinBox(DoubleProperty& d, bool easyScrollable, QWidget* parent) +DoubleSpinBox::DoubleSpinBox(const DoubleProperty& d, bool easyScrollable, QWidget* parent) : QDoubleSpinBox(parent) , m_valueProperty(d) , m_easyScrollable(easyScrollable) diff --git a/GUI/View/Numeric/DoubleSpinBox.h b/GUI/View/Numeric/DoubleSpinBox.h index f0592914ac6eac84c44b42e9499d6abb285dfdc1..d891e84a74b32bbc47c611ffd695e29833777a0d 100644 --- a/GUI/View/Numeric/DoubleSpinBox.h +++ b/GUI/View/Numeric/DoubleSpinBox.h @@ -27,7 +27,7 @@ public: //! policy). Furthermore, the spin box will prohibit accidental changes by the mouse wheel. //! Otherwise it would be dangerous if the spin box is on a scrollable form - unintended and //! unnoticed changes would take place when just scrolling through the form. - DoubleSpinBox(DoubleProperty& d, bool easyScrollable = false, QWidget* parent = nullptr); + DoubleSpinBox(const DoubleProperty& d, bool easyScrollable = false, QWidget* parent = nullptr); //! Set the value void setBaseValue(double value); @@ -47,7 +47,7 @@ private: void wheelEvent(QWheelEvent* event) override; void onDisplayValueChanged(double newDisplayValue); - DoubleProperty& m_valueProperty; + const DoubleProperty& m_valueProperty; bool m_easyScrollable; };