mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
fix routing controls add/update logic
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user