Merge branch '0.5.x' into 0.6.0.x
[novacoin.git] / src / qt / addressbookpage.cpp
index 76aa87b..32d0505 100644 (file)
@@ -121,11 +121,6 @@ void AddressBookPage::setModel(AddressTableModel *model)
     connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
             this, SLOT(selectionChanged()));
 
-    if(mode == ForSending)
-    {
-        // Auto-select first row when in sending mode
-        ui->tableView->selectRow(0);
-    }
     selectionChanged();
 }
 
@@ -308,8 +303,8 @@ void AddressBookPage::on_showQRCode_clicked()
     foreach (QModelIndex index, indexes)
     {
         QString address = index.data().toString(),
-            label = index.sibling(index.row(), 0).data().toString(),
-            title = QString("%1 << %2 >>").arg(label).arg(address);
+            label = index.sibling(index.row(), 0).data(Qt::EditRole).toString(),
+            title = QString("%1%2<< %3 >>").arg(label).arg(label.isEmpty() ? "" : " ").arg(address);
 
         QRCodeDialog *d = new QRCodeDialog(title, address, label, tab == ReceivingTab, this);
         d->show();