diff options
Diffstat (limited to 'qt')
-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); |