Fix condition

This commit is contained in:
Dima-1 2020-02-04 13:28:12 +02:00
parent e7e209431b
commit ad6a2bf413

View file

@ -1236,9 +1236,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
return true; return true;
} }
}); });
if (info.getType() == LocalIndexType.TILES_DATA && (info.getAttachedObject() instanceof ITileSource) if (info.getType() == LocalIndexType.TILES_DATA
&& ((ITileSource) info.getAttachedObject()).couldBeDownloadedFromInternet() && (info.getAttachedObject() instanceof TileSourceManager.TileSourceTemplate)) {
|| info.getAttachedObject() instanceof TileSourceManager.TileSourceTemplate) {
item = optionsMenu.getMenu().add(R.string.shared_string_edit) item = optionsMenu.getMenu().add(R.string.shared_string_edit)
.setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark)); .setIcon(iconsCache.getThemedIcon(R.drawable.ic_action_edit_dark));
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {