Merge branch 'sasha_pasha_branch' of ssh://github.com/osmandapp/Osmand into sasha_pasha_branch
This commit is contained in:
commit
0e5d09eb82
3 changed files with 9 additions and 2 deletions
|
@ -819,6 +819,7 @@ public class OsmandAidlApi {
|
|||
PointDescription pd = new PointDescription(
|
||||
PointDescription.POINT_TYPE_MAP_MARKER, markerNew.getName() != null ? markerNew.getName() : "");
|
||||
MapMarker marker = new MapMarker(m.point, pd, m.colorIndex, m.selected, m.index);
|
||||
marker.id = m.id;
|
||||
marker.creationDate = m.creationDate;
|
||||
marker.visitedDate = m.visitedDate;
|
||||
markersHelper.moveMapMarker(marker, latLonNew);
|
||||
|
|
|
@ -589,7 +589,6 @@ public class FavouritesDbHelper {
|
|||
return true;
|
||||
}
|
||||
|
||||
//todo
|
||||
public void editFavouriteGroup(FavoriteGroup group, String newName, int color, boolean visible) {
|
||||
MapMarkersHelper markersHelper = context.getMapMarkersHelper();
|
||||
if (color != 0 && group.color != color) {
|
||||
|
@ -605,6 +604,7 @@ public class FavouritesDbHelper {
|
|||
for (FavouritePoint p : gr.points) {
|
||||
p.setVisible(visible);
|
||||
}
|
||||
markersHelper.syncGroup(new MarkersSyncGroup(gr.name, gr.name, MarkersSyncGroup.FAVORITES_TYPE));
|
||||
}
|
||||
if (!group.name.equals(newName)) {
|
||||
FavoriteGroup gr = flatGroups.remove(group.name);
|
||||
|
|
|
@ -301,7 +301,12 @@ public class MapMarkersHelper {
|
|||
List<MapMarker> dbMarkers = markersDbHelper.getMarkersFromGroup(group);
|
||||
|
||||
if (group.getType() == MarkersSyncGroup.FAVORITES_TYPE) {
|
||||
List<FavouritePoint> favPoints = ctx.getFavorites().getGroup(group.name).points;
|
||||
FavouritesDbHelper.FavoriteGroup favGroup = ctx.getFavorites().getGroup(group.name);
|
||||
if (!favGroup.visible) {
|
||||
removeActiveMarkersFromSyncGroup(group.id);
|
||||
return;
|
||||
}
|
||||
List<FavouritePoint> favPoints = favGroup.points;
|
||||
for (FavouritePoint fp : favPoints) {
|
||||
LatLon fpLatLon = new LatLon(fp.getLatitude(), fp.getLongitude());
|
||||
boolean exists = false;
|
||||
|
@ -498,6 +503,7 @@ public class MapMarkersHelper {
|
|||
}
|
||||
}
|
||||
checkAndFixActiveMarkersOrderIfNeeded();
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue