Fixed #44, no longer enable non-existent UI

This commit is contained in:
Lucas Dower 2022-04-09 00:25:54 +01:00
parent d370e83cc9
commit a0e2bf8803

View File

@ -387,8 +387,11 @@ export class UI {
}
public enable(action: Action) {
LOG('enabling', action);
if (action >= Action.MAX) {
return;
}
LOG('enabling', action);
// TODO: Remove once Simplify has been implemented
if (action === Action.Simplify) {
action = Action.Voxelise;
@ -409,6 +412,10 @@ export class UI {
}
public disable(action: Action) {
if (action < 0) {
return;
}
for (let i = action; i < Action.MAX; ++i) {
const group = this._getActionGroup(i);
LOG('disabling', group.label);