Issue #6524 - Quick Action crash after selecting empty Overlay/Underlay/Map Style actions - FIXED
This commit is contained in:
parent
d9bf5ca746
commit
bb477d3272
3 changed files with 45 additions and 44 deletions
|
@ -84,6 +84,7 @@ public class MapOverlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
OsmandSettings settings = activity.getMyApplication().getSettings();
|
||||
List<Pair<String, String>> sources = loadListFromParams();
|
||||
|
||||
if(sources.size()>0) {
|
||||
boolean showBottomSheetStyles = Boolean.valueOf(getParams().get(KEY_DIALOG));
|
||||
if (showBottomSheetStyles) {
|
||||
showChooseDialog(activity.getSupportFragmentManager());
|
||||
|
@ -103,6 +104,7 @@ public class MapOverlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
executeWithParams(activity, nextSource.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeWithParams(MapActivity activity, String params) {
|
||||
|
@ -193,8 +195,7 @@ public class MapOverlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
|
||||
@Override
|
||||
public boolean fillParams(View root, MapActivity activity) {
|
||||
super.fillParams(root, activity);
|
||||
getParams().put(KEY_DIALOG, Boolean.toString(((SwitchCompat) root.findViewById(R.id.saveButton)).isChecked()));
|
||||
return true;
|
||||
return super.fillParams(root, activity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class MapSourceAction extends SwitchableAction<Pair<String, String>> {
|
|||
|
||||
OsmandSettings settings = activity.getMyApplication().getSettings();
|
||||
List<Pair<String, String>> sources = loadListFromParams();
|
||||
|
||||
if(sources.size()>0) {
|
||||
boolean showBottomSheetStyles = Boolean.valueOf(getParams().get(KEY_DIALOG));
|
||||
if (showBottomSheetStyles) {
|
||||
showChooseDialog(activity.getSupportFragmentManager());
|
||||
|
@ -97,6 +97,7 @@ public class MapSourceAction extends SwitchableAction<Pair<String, String>> {
|
|||
executeWithParams(activity, nextSource.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeWithParams(MapActivity activity, String params) {
|
||||
|
@ -195,8 +196,7 @@ public class MapSourceAction extends SwitchableAction<Pair<String, String>> {
|
|||
|
||||
@Override
|
||||
public boolean fillParams(View root, MapActivity activity) {
|
||||
super.fillParams(root, activity);
|
||||
getParams().put(KEY_DIALOG, Boolean.toString(((SwitchCompat) root.findViewById(R.id.saveButton)).isChecked()));
|
||||
return true;
|
||||
return super.fillParams(root, activity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ public class MapUnderlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
|
||||
OsmandSettings settings = activity.getMyApplication().getSettings();
|
||||
List<Pair<String, String>> sources = loadListFromParams();
|
||||
|
||||
if(sources.size()>0) {
|
||||
boolean showBottomSheetStyles = Boolean.valueOf(getParams().get(KEY_DIALOG));
|
||||
if (showBottomSheetStyles) {
|
||||
showChooseDialog(activity.getSupportFragmentManager());
|
||||
|
@ -102,6 +102,7 @@ public class MapUnderlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
executeWithParams(activity, nextSource.first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeWithParams(MapActivity activity, String params) {
|
||||
|
@ -196,8 +197,7 @@ public class MapUnderlayAction extends SwitchableAction<Pair<String, String>> {
|
|||
|
||||
@Override
|
||||
public boolean fillParams(View root, MapActivity activity) {
|
||||
super.fillParams(root, activity);
|
||||
getParams().put(KEY_DIALOG, Boolean.toString(((SwitchCompat) root.findViewById(R.id.saveButton)).isChecked()));
|
||||
return true;
|
||||
return super.fillParams(root, activity);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue