1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-23 08:15:19 +03:00

Added handing for selected LCs that are now disabled

This commit is contained in:
Darren Lines 2022-08-13 20:38:13 +01:00
parent b8485457dd
commit daa70fc4b1
2 changed files with 15 additions and 2 deletions

View file

@ -304,13 +304,22 @@ GUI_control.prototype.renderLogicConditionSelect = function ($container, logicCo
let $select = $container.append('<select class="mix-rule-condition">').find("select"),
lcCount = logicConditions.getCount();
option = "";
if (withAlways) {
$select.append('<option value="-1">Always</option>')
}
for (let i = 0; i < lcCount ; i++) {
if (!onlyEnabled || (logicConditions.isEnabled(i))) {
$select.append('<option value="' + i + '">Logic Condition ' + i + ' </option>');
if (!onlyEnabled || i === current || (logicConditions.isEnabled(i))) {
option = '<option';
if (i === current && !logicConditions.isEnabled(i)) {
option+= ' class="lc_disabled"';
}
option+= ' value="' + i + '">Logic Condition ' + i + ' </option>';
$select.append(option);
}
}