fix routing controls add/update logic

This commit is contained in:
vcoppe 2024-05-24 19:00:26 +02:00
parent 30e1cac0a9
commit 8e085a718f

View file

@ -59,10 +59,14 @@ export class RoutingControls {
return; return;
} }
let selected = get(selection).hasAnyChildren(new ListFileItem(this.fileId), true, ['waypoints']); let selected = get(selection).hasAnyChildren(new ListFileItem(this.fileId), true, ['waypoints']) && get(selection).size == 1;
if (selected) { if (selected) {
this.add(); if (this.active) {
} else if (!selected && this.active) { this.updateControls();
} else {
this.add();
}
} else if (this.active) {
this.remove(); this.remove();
} }
} }