Bugfixes (Crash on startup) #6332- fixed
This commit is contained in:
parent
be33d0cfc8
commit
dd58cac831
2 changed files with 7 additions and 3 deletions
|
@ -1399,7 +1399,10 @@ public class ConfigureMapMenu {
|
||||||
|
|
||||||
public static int parseTrackColor(RenderingRulesStorage renderer, String colorName) {
|
public static int parseTrackColor(RenderingRulesStorage renderer, String colorName) {
|
||||||
int defaultColor = -1;
|
int defaultColor = -1;
|
||||||
RenderingRule gpxRule = renderer.getRenderingAttributeRule("gpx");
|
RenderingRule gpxRule = null;
|
||||||
|
if(renderer!=null) {
|
||||||
|
gpxRule = renderer.getRenderingAttributeRule("gpx");
|
||||||
|
}
|
||||||
if (gpxRule != null && gpxRule.getIfElseChildren().size() > 0) {
|
if (gpxRule != null && gpxRule.getIfElseChildren().size() > 0) {
|
||||||
List<RenderingRule> rules = renderer.getRenderingAttributeRule("gpx").getIfElseChildren().get(0).getIfElseChildren();
|
List<RenderingRule> rules = renderer.getRenderingAttributeRule("gpx").getIfElseChildren().get(0).getIfElseChildren();
|
||||||
for (RenderingRule r : rules) {
|
for (RenderingRule r : rules) {
|
||||||
|
|
|
@ -889,7 +889,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
boolean needMapAdjust = currentMenuState != newMenuState && newMenuState != MenuState.FULL_SCREEN;
|
boolean needMapAdjust = currentMenuState != newMenuState && newMenuState != MenuState.FULL_SCREEN;
|
||||||
|
|
||||||
if (newMenuState != currentMenuState) {
|
if (newMenuState != currentMenuState) {
|
||||||
restoreCustomMapRatio();
|
//restoreCustomMapRatio();
|
||||||
menu.updateControlsVisibility(true);
|
menu.updateControlsVisibility(true);
|
||||||
doBeforeMenuStateChange(currentMenuState, newMenuState);
|
doBeforeMenuStateChange(currentMenuState, newMenuState);
|
||||||
toggleDetailsHideButton();
|
toggleDetailsHideButton();
|
||||||
|
@ -899,6 +899,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restoreCustomMapRatio() {
|
private void restoreCustomMapRatio() {
|
||||||
|
//do we need this? setCustomRatio never used, so what we restoring?
|
||||||
if (map != null && map.hasCustomMapRatio()) {
|
if (map != null && map.hasCustomMapRatio()) {
|
||||||
map.restoreMapRatio();
|
map.restoreMapRatio();
|
||||||
}
|
}
|
||||||
|
@ -1245,7 +1246,7 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
restoreCustomMapRatio();
|
//restoreCustomMapRatio();
|
||||||
|
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
ViewParent parent = view.getParent();
|
ViewParent parent = view.getParent();
|
||||||
|
|
Loading…
Reference in a new issue