This commit is contained in:
max-klaus 2020-03-27 22:49:35 +03:00
parent d983309242
commit 684e5ddf15

View file

@ -406,23 +406,23 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
}
public void switchRotateMapMode(){
String rotMode = app.getString(R.string.rotate_map_none_opt);
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_NONE && mapView.getRotate() != 0) {
// reset manual rotation
} else {
int vl = (settings.ROTATE_MAP.get() + 1) % 3;
settings.ROTATE_MAP.set(vl);
if (mapView != null) {
String rotMode = app.getString(R.string.rotate_map_none_opt);
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_NONE && mapView.getRotate() != 0) {
// reset manual rotation
} else {
int vl = (settings.ROTATE_MAP.get() + 1) % 3;
settings.ROTATE_MAP.set(vl);
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING) {
rotMode = app.getString(R.string.rotate_map_bearing_opt);
} else if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS) {
rotMode = app.getString(R.string.rotate_map_compass_opt);
if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING) {
rotMode = app.getString(R.string.rotate_map_bearing_opt);
} else if (settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS) {
rotMode = app.getString(R.string.rotate_map_compass_opt);
}
}
}
rotMode = app.getString(R.string.rotate_map_to_bearing) + ":\n" + rotMode;
app.showShortToastMessage(rotMode);
updateSettings();
if(mapView != null) {
rotMode = app.getString(R.string.rotate_map_to_bearing) + ":\n" + rotMode;
app.showShortToastMessage(rotMode);
updateSettings();
mapView.refreshMap();
}
}