diff --git a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java index c30df1a413..15464a83dd 100644 --- a/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java +++ b/OsmAnd/src/net/osmand/plus/FavouritesDbHelper.java @@ -483,7 +483,7 @@ public class FavouritesDbHelper { cachedFavoritePoints = temp; } - private void sortAll() { + public void sortAll() { final Collator collator = Collator.getInstance(); collator.setStrength(Collator.SECONDARY); Collections.sort(favoriteGroups, new Comparator() { diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java index 6dc0561ed8..57319c7ab9 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxImportHelper.java @@ -182,6 +182,7 @@ public class GpxImportHelper { favoritesHelper.deleteFavourite(favourite, false); favoritesHelper.addFavourite(favourite, false); } + favoritesHelper.sortAll(); favoritesHelper.saveCurrentPointsIntoFile(); return null; }