| 313 | } |
| 314 | |
| 315 | void AddressBookPage::selectNewAddress(const QModelIndex &parent, int begin, int /*end*/) |
| 316 | { |
| 317 | QModelIndex idx = proxyModel->mapFromSource(model->index(begin, AddressTableModel::Address, parent)); |
| 318 | if(idx.isValid() && (idx.data(Qt::EditRole).toString() == newAddressToSelect)) |
| 319 | { |
| 320 | // Select row of newly created address, once |
| 321 | ui->tableView->setFocus(); |
| 322 | ui->tableView->selectRow(idx.row()); |
| 323 | newAddressToSelect.clear(); |
| 324 | } |
| 325 | } |