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;
}
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) {
this.add();
} else if (!selected && this.active) {
if (this.active) {
this.updateControls();
} else {
this.add();
}
} else if (this.active) {
this.remove();
}
}