Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-02-03 14:20:44 +01:00
commit 4bd2258f93
3 changed files with 14 additions and 6 deletions

View file

@ -274,7 +274,8 @@ public abstract class MapRenderingTypes {
String v = parser.getAttributeValue("", "nameTags");
if (v != null) {
String[] names = v.split(",");
rtype.names = new MapRulType[names.length];
rtype.names = new MapRulType[names.length * (langs.length + 1)];
int j = 0;
for (int i = 0; i < names.length; i++) {
String tagName = names[i];
if (rtype.namePrefix.length() > 0) {
@ -282,7 +283,12 @@ public abstract class MapRenderingTypes {
}
MapRulType mt = MapRulType.createText(tagName);
mt = registerRuleType(mt);
rtype.names[i] = mt;
rtype.names[j++] = mt;
for(String lng : langs) {
mt = MapRulType.createText(tagName + ":" + lng);
mt = registerRuleType(mt);
rtype.names[j++] = mt;
}
}
}
}

View file

@ -316,12 +316,9 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getY() <= menuTopViewHeight) {
if (!hasMoved && event.getY() <= menuTopViewHeight) {
if (singleTapDetector.onTouchEvent(event)) {
moving = false;
if (hasMoved) {
applyPosY(getViewY(), false, false, 0, 0, 0);
}
openMenuHalfScreen();
recycleVelocityTracker();
@ -383,6 +380,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
case MotionEvent.ACTION_UP:
if (moving) {
moving = false;
hasMoved = false;
int currentY = getViewY();
final VelocityTracker velocityTracker = this.velocityTracker;
@ -413,6 +411,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
break;
case MotionEvent.ACTION_CANCEL:
moving = false;
hasMoved = false;
recycleVelocityTracker();
break;

View file

@ -604,6 +604,9 @@ public class ContextMenuLayer extends OsmandMapLayer {
if (entry.getKey().startsWith("name:") && !entry.getValue().equals("")) {
names.add(entry.getValue());
}
if (entry.getKey().equals("name") && !entry.getValue().equals("")) {
names.add(entry.getValue());
}
}
LatLon searchLatLon = objectLatLon;
if (searchLatLon == null) {