[qt][editor] Correctly display valid feature’s street.

This commit is contained in:
Alex Zolotarev 2016-03-07 13:11:46 +02:00 committed by Sergey Yershov
parent 17dc6e67c3
commit 01e3ed36fb

View file

@ -87,8 +87,12 @@ EditorDialog::EditorDialog(QWidget * parent, osm::EditableMapObject & emo)
nearbyStreets.insert(nearbyStreets.begin(), "");
grid->addWidget(new QLabel(kStreetObjectName), row, 0);
QComboBox * cmb = new QComboBox();
for (auto const & street : nearbyStreets)
cmb->addItem(street.c_str());
for (int i = 0; i < nearbyStreets.size(); ++i)
{
cmb->addItem(nearbyStreets[i].c_str());
if (emo.GetStreet() == nearbyStreets[i])
cmb->setCurrentIndex(i);
}
cmb->setObjectName(kStreetObjectName);
grid->addWidget(cmb, row++, 1);