diff options
author | Alex Zolotarev <alex@maps.me> | 2016-03-07 14:11:46 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:52:44 +0300 |
commit | 01e3ed36fbadb19e6eeca2ee25c56331bddfe32d (patch) | |
tree | 9c2c32a3da77873fafec4fa5441b7b8e22ba0c01 /qt/editor_dialog.cpp | |
parent | 17dc6e67c337bd9b2182688042073ccfdb9537cd (diff) |
[qt][editor] Correctly display valid feature’s street.
Diffstat (limited to 'qt/editor_dialog.cpp')
-rw-r--r-- | qt/editor_dialog.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qt/editor_dialog.cpp b/qt/editor_dialog.cpp index 0eaa975d63..955812c1cc 100644 --- a/qt/editor_dialog.cpp +++ b/qt/editor_dialog.cpp @@ -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); |