Make address addable in the editor

Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
map-per
2025-08-19 21:29:29 +02:00
committed by map-per
parent cd29eda949
commit 00d3f9a370
10 changed files with 109 additions and 3 deletions

View File

@@ -433,6 +433,12 @@ bool EditableMapObject::ValidateHouseNumber(string const & houseNumber)
return false;
}
bool EditableMapObject::CheckHouseNumberWhenIsAddress() const
{
// House number is mandatory for the address type. For other types it's optional.
return !m_houseNumber.empty() || !m_types.Has(classif().GetTypeByReadableObjectName("building-address"));
}
// static
bool EditableMapObject::ValidateFlats(string const & flats)
{