From 340bff34b7fda69358d959fae26baa0cd90f32d3 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 2 Jan 2014 09:32:03 +0100 Subject: [PATCH] ui: Better tab order in send coins entry Pressing after entering a label now brings the focus to the address entry, instead of the row of buttons. In my experience this is more useful, as I usually want to paste an address after entering the label. The buttons are mostly useless anyway: - Choosing a previously used address should be discouraged - When I'm already using the keyboard the 'paste address' button is useless - just use the Ctrl-V. Maybe it would be an idea to remove it completely - I usually don't want to remove the entry I'm typing now! So makes sense to have it at the end of the tab chain. --- src/qt/sendcoinsentry.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index 4d28f68861bd5..3f5d0cda3a686 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -155,11 +155,12 @@ SendCoinsRecipient SendCoinsEntry::getValue() QWidget *SendCoinsEntry::setupTabChain(QWidget *prev) { QWidget::setTabOrder(prev, ui->payTo); - QWidget::setTabOrder(ui->payTo, ui->addressBookButton); + QWidget::setTabOrder(ui->payTo, ui->addAsLabel); + QWidget *w = ui->payAmount->setupTabChain(ui->addAsLabel); + QWidget::setTabOrder(w, ui->addressBookButton); QWidget::setTabOrder(ui->addressBookButton, ui->pasteButton); QWidget::setTabOrder(ui->pasteButton, ui->deleteButton); - QWidget::setTabOrder(ui->deleteButton, ui->addAsLabel); - return ui->payAmount->setupTabChain(ui->addAsLabel); + return ui->deleteButton; } void SendCoinsEntry::setValue(const SendCoinsRecipient &value)