Fixed enabling non-existent action groups

This commit is contained in:
Lucas Dower 2023-06-26 14:23:04 +01:00
parent 8fb58815b9
commit d67e4451e1

View File

@ -790,11 +790,13 @@ export class UI {
* Enable a specific action. * Enable a specific action.
*/ */
public enable(action: EAction) { public enable(action: EAction) {
if (action < EAction.MAX) {
this._forEachComponent(action, (component) => { this._forEachComponent(action, (component) => {
component.setEnabled(true); component.setEnabled(true);
}); });
this._getGroup(action).execButton?.setEnabled(true); this._getGroup(action).execButton?.setEnabled(true);
} }
}
/** /**
* Enable all actions up to and including a specific action. * Enable all actions up to and including a specific action.