forked from organicmaps/organicmaps
[editor] Hide 'levels' field for buildings which were added as point.
This commit is contained in:
parent
681db0a3db
commit
cd979cf617
4 changed files with 9 additions and 2 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue