mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
detect and ignore duplicate POIs when merging
This commit is contained in:
@@ -593,7 +593,11 @@ export const dbUtils = {
|
||||
if (file && originalFile) {
|
||||
if (level === ListLevel.FILE) {
|
||||
toMerge.trk.push(...originalFile.trk.map((track) => track.clone()));
|
||||
toMerge.wpt.push(...originalFile.wpt.map((wpt) => wpt.clone()));
|
||||
for (const wpt of originalFile.wpt) {
|
||||
if (!toMerge.wpt.some((w) => w.equals(wpt))) {
|
||||
toMerge.wpt.push(wpt.clone());
|
||||
}
|
||||
}
|
||||
if (first) {
|
||||
target = items[0];
|
||||
targetFile = file;
|
||||
|
Reference in New Issue
Block a user