tracks duplicated in visible tracks fixed#5532
Conversation
There was a problem hiding this comment.
-
Normalization is fixed only in this screen/helper, not at the persisted visible-track state boundary.
File/function: OAAppSettings.m showGpx, hideGpx, updateGpx; OASelectedGPXHelper.mm buildGpxList -
loadGpxTracks() hides duplicate DB rows nondeterministically.
File/function: MapSettingsGpxViewController.loadGpxTracks
Why dangerous: filtering before sorting keeps whichever duplicate OAGPXDatabase.getDataItems() returns first. If one row is stale after rename, the UI may operate on the wrong GpxDataItem path while the real duplicate remains in the DB
tigrim
left a comment
There was a problem hiding this comment.
-
TracksViewController.updateRenamedGpx ignores the result of gpxDB.renameCurrentFile(src, newFile: dest). If the DB rename returns false, the code still continues with handleDeletedGpxFile/addTrackItemToSmartFolder, which can leave the file, GPX DB, and smart folders out of sync. It would be safer to handle failure here similarly to OAGPXUIHelper.
-
The fix normalizes specific rename paths, but the persisted visible tracks state is still compared as raw strings in OAAppSettings showGpx/updateGpx/hideGpx and OASelectedGPXHelper/buildGpxList. If a path reaches mapSettingVisibleGpx from another entry point in a different Unicode form, the issue may come back. It may be better to normalize or compare paths at the mapSettingVisibleGpx boundary.


No description provided.