Skip to content

Commit

Permalink
Resintate metadata numeric min/max limits
Browse files Browse the repository at this point in the history
.. a regression introduced in e0ec5ba removed the limits
   for double and integer metadata fields.

Fixes #4125
  • Loading branch information
liversedge committed Jan 9, 2022
1 parent 0e8702c commit 50f5efb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Metrics/RideMetadata.cpp
Expand Up @@ -705,7 +705,8 @@ FormField::FormField(FieldDefinition field, RideMetadata *meta) : definition(fie

case FIELD_INTEGER : // integer
widget = new QSpinBox(this);
((QSpinBox*)widget)->setMaximum(100);
((QSpinBox*)widget)->setMinimum(-9999999);
((QSpinBox*)widget)->setMaximum(9999999);
((QSpinBox*)widget)->setButtonSymbols(QAbstractSpinBox::NoButtons);
connect (widget, SIGNAL(valueChanged(int)), this, SLOT(dataChanged()));
connect (widget, SIGNAL(editingFinished()), this, SLOT(editFinished()));
Expand All @@ -715,6 +716,8 @@ FormField::FormField(FieldDefinition field, RideMetadata *meta) : definition(fie
widget = new QDoubleSpinBox(this);
//widget->setFixedHeight(18);
((QDoubleSpinBox*)widget)->setButtonSymbols(QAbstractSpinBox::NoButtons);
((QDoubleSpinBox*)widget)->setMinimum(-9999999.99);
((QDoubleSpinBox*)widget)->setMaximum(9999999.99);
if (GlobalContext::context()->specialFields.isMetric(field.name)) {

enabled = new QCheckBox(this);
Expand Down

0 comments on commit 50f5efb

Please sign in to comment.