diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-07-02 17:31:27 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-07-02 17:31:27 +0200 |
commit | 154e25ff60115b9ff286b97ffc87d65736593c86 (patch) | |
tree | c50725d46c76cbf90dd497d0abb12c9b6c891bff /src/qt/addressbookdialog.cpp | |
parent | c1ffa5b1c5d79a6c52547ff58292c571c2bc3952 (diff) |
ui improvements: allow inline editing of labels/addresses in address book table, better tab order in send dialog, set focus on sending address table when coming from send coins dialog
Diffstat (limited to 'src/qt/addressbookdialog.cpp')
-rw-r--r-- | src/qt/addressbookdialog.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/qt/addressbookdialog.cpp b/src/qt/addressbookdialog.cpp index 5eb60b77fd..5a744aec48 100644 --- a/src/qt/addressbookdialog.cpp +++ b/src/qt/addressbookdialog.cpp @@ -11,19 +11,16 @@ AddressBookDialog::AddressBookDialog(Mode mode, QWidget *parent) : QDialog(parent), ui(new Ui::AddressBookDialog), - model(0) + model(0), + mode(mode) { ui->setupUi(this); - switch(mode) { case ForSending: connect(ui->receiveTableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(on_buttonBox_accepted())); connect(ui->sendTableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(on_buttonBox_accepted())); - break; - case ForEditing: - connect(ui->receiveTableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(on_editButton_clicked())); - connect(ui->sendTableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(on_editButton_clicked())); + ui->sendTableView->setFocus(); break; } } @@ -66,6 +63,12 @@ void AddressBookDialog::setModel(AddressTableModel *model) AddressTableModel::Address, 320); ui->sendTableView->horizontalHeader()->setResizeMode( AddressTableModel::Label, QHeaderView::Stretch); + + if(mode == ForSending) + { + // Auto-select first row when in sending mode + ui->sendTableView->selectRow(0); + } } void AddressBookDialog::setTab(int tab) |