mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +03:00
Re #1783: NOT curves removed from inputs (for non ARM platforms)
This commit is contained in:
parent
525d956935
commit
8a80463476
3 changed files with 10 additions and 7 deletions
|
@ -273,11 +273,13 @@ void CurveGroup::update()
|
|||
if (lastType != curve.type) {
|
||||
lastType = curve.type;
|
||||
curveValueCB->clear();
|
||||
for (int i=-numcurves; i<=numcurves; i++) {
|
||||
curveValueCB->addItem(CurveReference(CurveReference::CURVE_REF_CUSTOM, i).toString());
|
||||
for (int i= ((flags & HIDE_NEGATIVE_CURVES) ? 0 : -numcurves); i<=numcurves; i++) {
|
||||
curveValueCB->addItem(CurveReference(CurveReference::CURVE_REF_CUSTOM, i).toString(), i);
|
||||
if (i == curve.value) {
|
||||
curveValueCB->setCurrentIndex(curveValueCB->count() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
curveValueCB->setCurrentIndex(curve.value+numcurves);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -344,7 +346,7 @@ void CurveGroup::valuesChanged()
|
|||
curve = CurveReference(CurveReference::CURVE_REF_FUNC, curveValueCB->currentIndex());
|
||||
break;
|
||||
case 3:
|
||||
curve = CurveReference(CurveReference::CURVE_REF_CUSTOM, curveValueCB->currentIndex() - GetCurrentFirmware()->getCapability(NumCurves));
|
||||
curve = CurveReference(CurveReference::CURVE_REF_CUSTOM, curveValueCB->itemData(curveValueCB->currentIndex()).toInt());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue