forked from organicmaps/organicmaps
[android] fix: Incorrect search fragment behavior.
This commit is contained in:
parent
87b94399bf
commit
55f1e6e027
2 changed files with 11 additions and 10 deletions
|
@ -655,7 +655,7 @@ public class RoutingController
|
|||
mContainer.updateMenu();
|
||||
}
|
||||
|
||||
private void onPoiSelectedInternal(@Nullable MapObject point)
|
||||
private void onPoiSelectedInternal(@Nullable MapObject point, int slot)
|
||||
{
|
||||
if (mContainer == null)
|
||||
return;
|
||||
|
@ -664,14 +664,10 @@ public class RoutingController
|
|||
|
||||
if (point != null)
|
||||
{
|
||||
boolean set;
|
||||
if (mWaitingPoiPickSlot == 1)
|
||||
set = setStartPoint(point);
|
||||
if (slot == 1)
|
||||
setStartPoint(point);
|
||||
else
|
||||
set = setEndPoint(point);
|
||||
|
||||
if (set)
|
||||
return;
|
||||
setEndPoint(point);
|
||||
}
|
||||
|
||||
showRoutePlan();
|
||||
|
@ -679,9 +675,10 @@ public class RoutingController
|
|||
|
||||
public void onPoiSelected(@Nullable MapObject point)
|
||||
{
|
||||
onPoiSelectedInternal(point);
|
||||
mContainer.updatePoints();
|
||||
int slot = mWaitingPoiPickSlot;
|
||||
mWaitingPoiPickSlot = NO_SLOT;
|
||||
onPoiSelectedInternal(point, slot);
|
||||
mContainer.updatePoints();
|
||||
}
|
||||
|
||||
public static CharSequence formatRoutingTime(int seconds)
|
||||
|
|
|
@ -475,8 +475,12 @@ public class SearchFragment extends BaseMwmFragment
|
|||
return true;
|
||||
}
|
||||
|
||||
mToolbarController.deactivate();
|
||||
if (mFromRoutePlan)
|
||||
{
|
||||
RoutingController.get().onPoiSelected(null);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue