void JoyControlStickButton::setChangeSetCondition(SetChangeCondition condition, bool passive) { if (condition != setSelectionCondition && !passive) { if (condition == SetChangeWhileHeld || condition == SetChangeTwoWay) { // Set new condition emit setAssignmentChanged(index, this->stick->getIndex(), setSelection, condition); } else if (setSelectionCondition == SetChangeWhileHeld || setSelectionCondition == SetChangeTwoWay) { // Remove old condition emit setAssignmentChanged(index, this->stick->getIndex(), setSelection, SetChangeDisabled); } setSelectionCondition = condition; } else if (passive) { setSelectionCondition = condition; } if (setSelectionCondition == SetChangeDisabled) { setChangeSetSelection(-1); } }
void JoyControlStickButton::setChangeSetCondition(SetChangeCondition condition, bool passive) { SetChangeCondition oldCondition = setSelectionCondition; if (condition != setSelectionCondition && !passive) { if (condition == SetChangeWhileHeld || condition == SetChangeTwoWay) { // Set new condition emit setAssignmentChanged(index, this->stick->getIndex(), setSelection, condition); } else if (setSelectionCondition == SetChangeWhileHeld || setSelectionCondition == SetChangeTwoWay) { // Remove old condition emit setAssignmentChanged(index, this->stick->getIndex(), setSelection, SetChangeDisabled); } setSelectionCondition = condition; } else if (passive) { setSelectionCondition = condition; } if (setSelectionCondition == SetChangeDisabled) { setChangeSetSelection(-1); } if (setSelectionCondition != oldCondition) { buildActiveZoneSummaryString(); emit propertyUpdated(); } }