Stop extended limits affecting output fields referencing gvars
This commit is contained in:
@@ -57,7 +57,7 @@ LimitsGroup::LimitsGroup(Firmware * firmware, TableLayout * tableLayout, int row
|
|||||||
spinbox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
spinbox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
||||||
|
|
||||||
QHBoxLayout *horizontalLayout = new QHBoxLayout();
|
QHBoxLayout *horizontalLayout = new QHBoxLayout();
|
||||||
QCheckBox *gv = new QCheckBox(tr("GV"));
|
gv = new QCheckBox(tr("GV"));
|
||||||
gv->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
gv->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
||||||
horizontalLayout->addWidget(gv);
|
horizontalLayout->addWidget(gv);
|
||||||
QComboBox *cb = new QComboBox();
|
QComboBox *cb = new QComboBox();
|
||||||
@@ -84,14 +84,14 @@ void LimitsGroup::updateMinMax(int max)
|
|||||||
if (spinbox->maximum() == 0) {
|
if (spinbox->maximum() == 0) {
|
||||||
spinbox->setMinimum(-max * displayStep);
|
spinbox->setMinimum(-max * displayStep);
|
||||||
gvarGroup->setMinimum(-max);
|
gvarGroup->setMinimum(-max);
|
||||||
if (value < -max) {
|
if (!gv->isChecked() && value < -max) {
|
||||||
value = -max;
|
value = -max;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (spinbox->minimum() == 0) {
|
if (spinbox->minimum() == 0) {
|
||||||
spinbox->setMaximum(max * displayStep);
|
spinbox->setMaximum(max * displayStep);
|
||||||
gvarGroup->setMaximum(max);
|
gvarGroup->setMaximum(max);
|
||||||
if (value > max) {
|
if (!gv->isChecked() && value > max) {
|
||||||
value = max;
|
value = max;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class LimitsGroup
|
|||||||
GVarGroup *gvarGroup;
|
GVarGroup *gvarGroup;
|
||||||
int &value;
|
int &value;
|
||||||
double displayStep;
|
double displayStep;
|
||||||
|
QCheckBox *gv;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ChannelsPanel : public ModelPanel
|
class ChannelsPanel : public ModelPanel
|
||||||
|
|||||||
Reference in New Issue
Block a user