Fix exception
This commit is contained in:
parent
bd29fe7171
commit
8a5ae6accf
3 changed files with 17 additions and 8 deletions
|
@ -613,9 +613,12 @@ public class FavouritesActivity extends OsmandExpandableListActivity {
|
|||
ch.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(ch.isChecked()){
|
||||
if (ch.isChecked()) {
|
||||
groupsToDelete.add(model);
|
||||
favoritesToDelete.addAll(helper.getFavoriteGroups().get(model));
|
||||
List<FavouritePoint> fvs = helper.getFavoriteGroups().get(model);
|
||||
if (fvs != null) {
|
||||
favoritesToDelete.addAll(fvs);
|
||||
}
|
||||
favouritesAdapter.notifyDataSetInvalidated();
|
||||
} else {
|
||||
groupsToDelete.remove(model);
|
||||
|
|
|
@ -352,15 +352,16 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
|||
builder.setPositiveButton(R.string.default_buttons_yes, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
restoreRoutingMode();
|
||||
quit = true;
|
||||
restoreRoutingModeInner();
|
||||
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.default_buttons_no, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
notRestoreRoutingMode();
|
||||
quit = true;
|
||||
notRestoreRoutingMode();
|
||||
}
|
||||
});
|
||||
final AlertDialog dlg = builder.show();
|
||||
|
@ -383,8 +384,11 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
|||
delay --;
|
||||
tv.setText(getString(R.string.continue_follow_previous_route_auto, delay + ""));
|
||||
if(delay <= 0) {
|
||||
dlg.dismiss();
|
||||
restoreRoutingMode();
|
||||
if(dlg.isShowing()) {
|
||||
dlg.dismiss();
|
||||
}
|
||||
quit = true;
|
||||
restoreRoutingModeInner();
|
||||
} else {
|
||||
uiHandler.postDelayed(delayDisplay, 1000);
|
||||
}
|
||||
|
@ -394,8 +398,7 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
|||
delayDisplay.run();
|
||||
}
|
||||
|
||||
private void restoreRoutingMode() {
|
||||
quit = true;
|
||||
private void restoreRoutingModeInner() {
|
||||
AsyncTask<String, Void, GPXFile> task = new AsyncTask<String, Void, GPXFile>() {
|
||||
@Override
|
||||
protected GPXFile doInBackground(String... params) {
|
||||
|
|
|
@ -45,6 +45,9 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
|
||||
@Override
|
||||
public void updateLayers(OsmandMapTileView mapView, MapActivity activity){
|
||||
if (osmBugsLayer == null) {
|
||||
registerLayers(activity);
|
||||
}
|
||||
if(mapView.getLayers().contains(osmBugsLayer) != settings.SHOW_OSM_BUGS.get()){
|
||||
if(settings.SHOW_OSM_BUGS.get()){
|
||||
mapView.addLayer(osmBugsLayer, 2);
|
||||
|
|
Loading…
Reference in a new issue