Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-04-10 10:05:59 +02:00
commit 7a45b26535

View file

@ -1,5 +1,7 @@
package net.osmand.plus.mapcontextmenu.other; package net.osmand.plus.mapcontextmenu.other;
import android.support.v4.app.Fragment;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.mapcontextmenu.BaseMenuController; import net.osmand.plus.mapcontextmenu.BaseMenuController;
@ -10,7 +12,10 @@ public class DestinationReachedMenu extends BaseMenuController {
} }
public static void show(MapActivity mapActivity) { public static void show(MapActivity mapActivity) {
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(DestinationReachedMenuFragment.TAG);
if (fragment == null || fragment.isDetached()) {
DestinationReachedMenu menu = new DestinationReachedMenu(mapActivity); DestinationReachedMenu menu = new DestinationReachedMenu(mapActivity);
DestinationReachedMenuFragment.showInstance(menu); DestinationReachedMenuFragment.showInstance(menu);
} }
} }
}