Merge pull request #10674 from osmandapp/fix_upload_of_edits
Fix upload of OSM Edits | Fix #10658
This commit is contained in:
commit
2e6ec0928f
2 changed files with 7 additions and 2 deletions
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<string name="toast_select_edits_for_upload">Select edits for upload</string>
|
||||||
<string name="copy_to_map_favorites">Copy to favorites</string>
|
<string name="copy_to_map_favorites">Copy to favorites</string>
|
||||||
<string name="copy_to_map_markers">Copy to map markers</string>
|
<string name="copy_to_map_markers">Copy to map markers</string>
|
||||||
<string name="delete_waypoints">Delete waypoints</string>
|
<string name="delete_waypoints">Delete waypoints</string>
|
||||||
|
|
|
@ -295,8 +295,12 @@ public class OsmEditsFragment extends OsmAndListFragment implements ProgressDial
|
||||||
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
uploadItems(osmEditsSelected.toArray(new OsmPoint[0]));
|
if (Algorithms.isEmpty(osmEditsSelected)) {
|
||||||
mode.finish();
|
app.showToastMessage(R.string.toast_select_edits_for_upload);
|
||||||
|
} else {
|
||||||
|
uploadItems(osmEditsSelected.toArray(new OsmPoint[0]));
|
||||||
|
mode.finish();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue