[editor] Hide 'levels' field for buildings which were added as point.

This commit is contained in:
Arsentiy Milchakov 2017-05-04 19:29:29 +03:00 committed by r.kuznetsov
parent 681db0a3db
commit cd979cf617
4 changed files with 9 additions and 2 deletions

View file

@ -298,6 +298,12 @@ Java_com_mapswithme_maps_editor_Editor_nativeIsNameEditable(JNIEnv * env, jclass
return g_editableMapObject.IsNameEditable();
}
JNIEXPORT jboolean JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeIsPointType(JNIEnv * env, jclass clazz)
{
return g_editableMapObject.IsPointType();
}
JNIEXPORT jboolean JNICALL
Java_com_mapswithme_maps_editor_Editor_nativeIsBuilding(JNIEnv * env, jclass clazz)
{

View file

@ -100,6 +100,7 @@ public final class Editor
public static native boolean nativeIsAddressEditable();
public static native boolean nativeIsNameEditable();
public static native boolean nativeIsPointType();
public static native boolean nativeIsBuilding();
public static native NamesDataSource nativeGetNamesDataSource(boolean needFakes);

View file

@ -287,7 +287,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
{
UiUtils.showIf(Editor.nativeIsNameEditable(), mCardName);
UiUtils.showIf(Editor.nativeIsAddressEditable(), mCardAddress);
UiUtils.showIf(Editor.nativeIsBuilding(), mBlockLevels);
UiUtils.showIf(Editor.nativeIsBuilding() && !Editor.nativeIsPointType(), mBlockLevels);
final int[] editableMeta = Editor.nativeGetEditableFields();
if (editableMeta.length == 0)

View file

@ -410,7 +410,7 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
{
m_sections.push_back(MWMEditorSectionAddress);
m_cells[MWMEditorSectionAddress] = kSectionAddressCellTypes;
if (m_mapObject.IsBuilding())
if (m_mapObject.IsBuilding() && !m_mapObject.IsPointType())
m_cells[MWMEditorSectionAddress].push_back(MWMPlacePageCellTypeBuildingLevels);
registerCellsForTableView(kSectionAddressCellTypes, self.tableView);