Commit a932291a authored by Volker Krause's avatar Volker Krause
Browse files

Only overwrite capacity information when we actually have that value

parent 1b130060
......@@ -159,7 +159,9 @@ OSM::Node LocationQueryOverlayProxyModel::nodeForRow(int row) const
node.id = m_data->dataSet().nextInternalId();
OSM::setTagValue(node, m_tagKeys.amenity, "bicycle_rental");
OSM::setTagValue(node, m_tagKeys.capacity, QByteArray::number(loc.rentalVehicleStation().capacity()));
if (loc.rentalVehicleStation().capacity() >= 0) {
OSM::setTagValue(node, m_tagKeys.capacity, QByteArray::number(loc.rentalVehicleStation().capacity()));
}
OSM::setTagValue(node, m_tagKeys.realtimeAvailable, QByteArray::number(loc.rentalVehicleStation().availableVehicles()));
if (OSM::tagValue(node, m_tagKeys.network).isEmpty()) {
OSM::setTagValue(node, m_tagKeys.network, loc.rentalVehicleStation().network().name().toUtf8());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment