diff --git a/companion/src/modeledit/channels.cpp b/companion/src/modeledit/channels.cpp index 27374a8c4..f0353ee45 100644 --- a/companion/src/modeledit/channels.cpp +++ b/companion/src/modeledit/channels.cpp @@ -57,7 +57,7 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row spinbox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); QHBoxLayout *horizontalLayout = new QHBoxLayout(); - QCheckBox *gv = new QCheckBox(tr("GV")); + gv = new QCheckBox(tr("GV")); gv->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); horizontalLayout->addWidget(gv); QComboBox *cb = new QComboBox(); @@ -84,14 +84,14 @@ void LimitsGroup::updateMinMax(int max) if (spinbox->maximum() == 0) { spinbox->setMinimum(-max * displayStep); gvarGroup->setMinimum(-max); - if (value < -max) { + if (!gv->isChecked() && value < -max) { value = -max; } } if (spinbox->minimum() == 0) { spinbox->setMaximum(max * displayStep); gvarGroup->setMaximum(max); - if (value > max) { + if (!gv->isChecked() && value > max) { value = max; } } diff --git a/companion/src/modeledit/channels.h b/companion/src/modeledit/channels.h index 2a65f497a..70da877e7 100644 --- a/companion/src/modeledit/channels.h +++ b/companion/src/modeledit/channels.h @@ -50,6 +50,7 @@ class LimitsGroup GVarGroup *gvarGroup; int &value; double displayStep; + QCheckBox *gv; }; class ChannelsPanel : public ModelPanel