front: avoid duplicate waypoints when adding via on click of the map
closes #13050
Before, changing the track of a via by clicking on the map resulted in adding an additional via at the same location, on the other track. We now check if the via already exists (same uic/ch) and if it does, we modify its track_reference without adding a new via.
Can we check OP ID instead of UIC+CH? The former is guaranteed to exist, the latter not.
Can we check OP ID instead of UIC+CH? The former is guaranteed to exist, the latter not.
not sure to understand. We're comparing the vias from the store, with the clickedOp from the map, both shouldn't have the same Id ?
The selected track is not updated We still have both tracks and the old track in the GOV
I was checking the track_reference of the via in the store with the track_reference of the new clicked via from the map, but it happens that the track_reference from the via in the store can be null for some reason, so I removed this condition.
Now only checking if uic / ch are the same -> still need to figure out if I should use OpId instead, work in progress.
https://github.com/user-attachments/assets/a08012f8-3863-47b5-adeb-0292d87f006e
For testing