forked from organicmaps/organicmaps
[qt][editor] Correctly display valid feature’s street.
This commit is contained in:
parent
17dc6e67c3
commit
01e3ed36fb
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue