Fixed bug when user try to start route without gpx file
This commit is contained in:
parent
57c3cb23b1
commit
04410eed3c
1 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,7 @@ package net.osmand.plus.sherpafy;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import android.widget.Toast;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.sherpafy.TourInformation.StageFavoriteGroup;
|
import net.osmand.plus.sherpafy.TourInformation.StageFavoriteGroup;
|
||||||
|
@ -105,7 +106,11 @@ public class SherpafyStageFragment extends SherlockFragment {
|
||||||
((TourViewActivity) getSherlockActivity()).selectMenu(tour);
|
((TourViewActivity) getSherlockActivity()).selectMenu(tour);
|
||||||
return true;
|
return true;
|
||||||
} else if(item.getItemId() == START) {
|
} else if(item.getItemId() == START) {
|
||||||
((TourViewActivity) getSherlockActivity()).startStage(stage);
|
if (stage.gpxFile != null){
|
||||||
|
((TourViewActivity) getSherlockActivity()).startStage(stage);
|
||||||
|
} else{
|
||||||
|
Toast.makeText(app, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if(item.getItemId() == NEXT_STAGE) {
|
} else if(item.getItemId() == NEXT_STAGE) {
|
||||||
((TourViewActivity) getSherlockActivity()).selectMenu(customization.getNextAvailableStage(tour));
|
((TourViewActivity) getSherlockActivity()).selectMenu(customization.getNextAvailableStage(tour));
|
||||||
|
|
Loading…
Reference in a new issue