Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-01-30 08:37:27 +01:00
commit c8add0a063
3 changed files with 25 additions and 6 deletions

View file

@ -1426,7 +1426,7 @@
<string name="versions_item">Sürümler</string> <string name="versions_item">Sürümler</string>
<string name="feedback">Görüşleriniz</string> <string name="feedback">Görüşleriniz</string>
<string name="contact_us">Bize Ulaşın</string> <string name="contact_us">Bize Ulaşın</string>
<string name="map_legend">Harita Efsanesi</string> <string name="map_legend">Harita İşaretleri</string>
<string name="save_poi_without_poi_type_message">Gerçekten POI türünü belirtmeden POI\' yi kaydetmek istiyor musunuz?</string> <string name="save_poi_without_poi_type_message">Gerçekten POI türünü belirtmeden POI\' yi kaydetmek istiyor musunuz?</string>
<string name="poi_context_menu_modify_osm_change">OSM değişikliği değiştirme</string> <string name="poi_context_menu_modify_osm_change">OSM değişikliği değiştirme</string>
<string name="new_version">Yeni Sürüm</string> <string name="new_version">Yeni Sürüm</string>

View file

@ -126,7 +126,7 @@ public class ShareMenuFragment extends BaseOsmAndFragment implements OnItemClick
public void dismissMenu() { public void dismissMenu() {
menu.getMapActivity().getSupportFragmentManager().popBackStackImmediate(TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE); menu.getMapActivity().getSupportFragmentManager().popBackStackImmediate(TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
if (menu.getMapActivity().getContextMenu().isVisible()) { if (menu.getMapActivity().getContextMenu().isVisible()) {
menu.getMapActivity().getContextMenu().hide(false); menu.getMapActivity().getContextMenu().close();
} }
} }
} }

View file

@ -227,8 +227,11 @@ public class PointNavigationLayer extends OsmandMapLayer implements
@Override @Override
public boolean isObjectMovable(Object o) { public boolean isObjectMovable(Object o) {
TargetPointsHelper targetPoints = map.getMyApplication().getTargetPointsHelper(); if (o != null && o instanceof TargetPoint) {
return o == targetPoints.getPointToNavigate(); TargetPointsHelper targetPointsHelper = map.getMyApplication().getTargetPointsHelper();
return targetPointsHelper.getAllPoints().contains(o);
}
return false;
} }
@Override @Override
@ -238,8 +241,24 @@ public class PointNavigationLayer extends OsmandMapLayer implements
TargetPoint newTargetPoint = null; TargetPoint newTargetPoint = null;
if (o instanceof TargetPoint) { if (o instanceof TargetPoint) {
TargetPointsHelper targetPointsHelper = map.getMyApplication().getTargetPointsHelper(); TargetPointsHelper targetPointsHelper = map.getMyApplication().getTargetPointsHelper();
targetPointsHelper.navigateToPoint(position, true, -1, new PointDescription(PointDescription.POINT_TYPE_LOCATION, "")); TargetPoint oldPoint = (TargetPoint) o;
if (oldPoint.start) {
targetPointsHelper.setStartPoint(position, true, null);
newTargetPoint = targetPointsHelper.getPointToStart();
} else if (oldPoint == targetPointsHelper.getPointToNavigate()) {
targetPointsHelper.navigateToPoint(position, true, -1, null);
newTargetPoint = targetPointsHelper.getPointToNavigate(); newTargetPoint = targetPointsHelper.getPointToNavigate();
} else if (oldPoint.intermediate) {
List<TargetPoint> points = targetPointsHelper.getIntermediatePointsWithTarget();
int i = points.indexOf(oldPoint);
if (i != -1) {
newTargetPoint = new TargetPoint(position,
new PointDescription(PointDescription.POINT_TYPE_LOCATION, ""));
points.set(i, newTargetPoint);
targetPointsHelper.reorderAllTargetPoints(points, true);
}
}
result = true; result = true;
} }
if (callback != null) { if (callback != null) {