Merge branch 'master' of https://github.com/osmandapp/Osmand
This commit is contained in:
commit
076d73b01c
3 changed files with 41 additions and 14 deletions
|
@ -2005,4 +2005,5 @@
|
|||
<string name="read_more">Падрабязьней</string>
|
||||
<string name="whats_new">Што новага ў</string>
|
||||
<string name="rendering_attr_hideProposed_name">Схаваць плануемыя аб\'екты</string>
|
||||
<string name="lang_mk">македонская</string>
|
||||
</resources>
|
||||
|
|
|
@ -2447,4 +2447,36 @@
|
|||
|
||||
<string name="poi_hackerspace">Hacklab</string>
|
||||
|
||||
</resources>
|
||||
<string name="poi_wiki_lang_af">Afrikaans wiki</string>
|
||||
<string name="poi_wiki_lang_als">Alsace wiki</string>
|
||||
<string name="poi_wiki_lang_az">Aserbajdsjanske wiki</string>
|
||||
<string name="poi_wiki_lang_bn">Bengalsk wiki</string>
|
||||
<string name="poi_wiki_lang_bpy">Bishnupriya wiki</string>
|
||||
<string name="poi_wiki_lang_br">Bretagnes wiki</string>
|
||||
<string name="poi_wiki_lang_cy">Walisisk wiki</string>
|
||||
<string name="poi_wiki_lang_eo">Esperanto wiki</string>
|
||||
<string name="poi_wiki_lang_eu">Baskiske wiki</string>
|
||||
<string name="poi_wiki_lang_fa">Farsi wiki</string>
|
||||
<string name="poi_wiki_lang_fy">Vestfrisisk</string>
|
||||
<string name="poi_wiki_lang_hy">Armenske wiki</string>
|
||||
<string name="poi_wiki_lang_is">Islandsk wiki</string>
|
||||
<string name="poi_wiki_lang_ka">Georgiske wiki</string>
|
||||
<string name="poi_wiki_lang_ku">Kurdiske wiki</string>
|
||||
<string name="poi_wiki_lang_la">Latin wiki</string>
|
||||
<string name="poi_wiki_lang_lb">Luxembourgsk wiki</string>
|
||||
<string name="poi_wiki_lang_mk">Makedonsk-wiki</string>
|
||||
<string name="poi_wiki_lang_ml">Malayalam wiki</string>
|
||||
<string name="poi_wiki_lang_mr">Marathi wiki</string>
|
||||
<string name="poi_wiki_lang_nds">Plattysk wiki</string>
|
||||
<string name="poi_wiki_lang_nv">Navajo wiki</string>
|
||||
<string name="poi_wiki_lang_os">Ossetiske wiki</string>
|
||||
<string name="poi_wiki_lang_pms">Piemontesiske wiki</string>
|
||||
<string name="poi_wiki_lang_sc">Sardiske wiki</string>
|
||||
<string name="poi_wiki_lang_sh">Serbokroatisk wiki</string>
|
||||
<string name="poi_wiki_lang_sq">Albansk-wiki</string>
|
||||
<string name="poi_wiki_lang_ta">Tamil wiki</string>
|
||||
<string name="poi_wiki_lang_tl">Filippinsk-wiki</string>
|
||||
|
||||
<string name="poi_wiki_lang_bs">Bosnisk wiki</string>
|
||||
<string name="poi_wiki_lang_ga">Irske wiki</string>
|
||||
</resources>
|
||||
|
|
|
@ -30,6 +30,7 @@ public class MapMultiSelectionMenu extends BaseMenuController {
|
|||
private LatLon latLon;
|
||||
private PointDescription pointDescription;
|
||||
private Object object;
|
||||
private int order;
|
||||
|
||||
private MapActivity mapActivity;
|
||||
private MenuController controller;
|
||||
|
@ -107,8 +108,6 @@ public class MapMultiSelectionMenu extends BaseMenuController {
|
|||
this.selectedObjects.clear();
|
||||
this.selectedObjects.putAll(selectedObjects);
|
||||
objects.clear();
|
||||
int order = Integer.MAX_VALUE;
|
||||
MenuObject topObject = null;
|
||||
for (Map.Entry<Object, IContextMenuProvider> e : selectedObjects.entrySet()) {
|
||||
Object selectedObj = e.getKey();
|
||||
IContextMenuProvider contextObject = selectedObjects.get(selectedObj);
|
||||
|
@ -130,25 +129,20 @@ public class MapMultiSelectionMenu extends BaseMenuController {
|
|||
objects.add(menuObject);
|
||||
|
||||
if (contextObject instanceof ContextMenuLayer.IContextMenuProviderSelection) {
|
||||
int i = ((ContextMenuLayer.IContextMenuProviderSelection) contextObject).getOrder(selectedObj);
|
||||
if (i < order) {
|
||||
topObject = menuObject;
|
||||
order = i;
|
||||
}
|
||||
menuObject.order = ((ContextMenuLayer.IContextMenuProviderSelection) contextObject).getOrder(selectedObj);
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(objects, new Comparator<MenuObject>() {
|
||||
@Override
|
||||
public int compare(MenuObject obj1, MenuObject obj2) {
|
||||
return obj1.getTitleStr().compareToIgnoreCase(obj2.getTitleStr());
|
||||
if (obj1.order == obj2.order) {
|
||||
return obj1.getTitleStr().compareToIgnoreCase(obj2.getTitleStr());
|
||||
} else {
|
||||
return obj1.order - obj2.order;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (topObject != null) {
|
||||
objects.remove(topObject);
|
||||
objects.add(0, topObject);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearMenu() {
|
||||
|
|
Loading…
Reference in a new issue