From 9aecf83050258dfcedf06510ad1797e608744393 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Mon, 28 Oct 2019 16:06:58 +0300 Subject: [PATCH] Fix #7182 --- .../osmedit/OsmEditOptionsBottomSheetDialogFragment.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditOptionsBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditOptionsBottomSheetDialogFragment.java index 9c1d396ca5..8d75c6b961 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditOptionsBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditOptionsBottomSheetDialogFragment.java @@ -9,6 +9,7 @@ import net.osmand.plus.base.bottomsheetmenu.BaseBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.SimpleBottomSheetItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.DividerHalfItem; import net.osmand.plus.base.bottomsheetmenu.simpleitems.TitleItem; +import net.osmand.util.Algorithms; public class OsmEditOptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragment { @@ -27,8 +28,11 @@ public class OsmEditOptionsBottomSheetDialogFragment extends MenuBottomSheetDial Bundle args = getArguments(); if (args != null) { final OsmPoint osmPoint = (OsmPoint) args.getSerializable(OSM_POINT); - - items.add(new TitleItem(OsmEditingPlugin.getName(osmPoint) + ":")); + String name = OsmEditingPlugin.getName(osmPoint); + if (Algorithms.isEmpty(name)) { + name = OsmEditingPlugin.getCategory(osmPoint, getContext()); + } + items.add(new TitleItem(name + ":")); BaseBottomSheetItem uploadItem = new SimpleBottomSheetItem.Builder() .setIcon(getContentIcon(R.drawable.ic_action_export))