Skip to content

Commit

Permalink
do not ask if road is lit or not if it is already known (=tagged) (#1037
Browse files Browse the repository at this point in the history
)
  • Loading branch information
westnordost committed May 2, 2018
1 parent 5af3f0d commit 6859e38
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void determineImplicitMaxspeedType()
{
if(getCountryInfo().getCountryCode().equals("GB"))
{
askLit(() -> applyNoSignAnswer("nsl_restricted"), () -> askSingleOrDualCarriageway());
determineLit(() -> applyNoSignAnswer("nsl_restricted"), () -> askSingleOrDualCarriageway());
}
else
{
Expand Down Expand Up @@ -227,6 +227,14 @@ private void askUrbanOrRural()
.show();
}

private void determineLit(Runnable onYes, Runnable onNo)
{
String lit = getOsmElement().getTags().get("lit");
if("yes".equals(lit)) onYes.run();
else if("no".equals(lit)) onNo.run();
else askLit(onYes, onNo);
}

private void askLit(Runnable onYes, Runnable onNo)
{
new AlertDialogBuilder(getActivity())
Expand Down

0 comments on commit 6859e38

Please sign in to comment.