Skip to content

Commit 73bf82f

Browse files
committedJul 11, 2016
Fix initial widget focus in credential dialog
1 parent 729fc49 commit 73bf82f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎src/gui/qgscredentialdialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ QgsCredentialDialog::QgsCredentialDialog( QWidget *parent, const Qt::WindowFlags
4343
Qt::BlockingQueuedConnection );
4444
mOkButton = buttonBox->button( QDialogButtonBox::Ok );
4545
leMasterPass->setPlaceholderText( tr( "Required" ) );
46+
leUsername->setFocus();
4647
}
4748

4849
QgsCredentialDialog::~QgsCredentialDialog()
@@ -119,6 +120,7 @@ void QgsCredentialDialog::requestCredentialsMasterPassword( QString * password,
119120
{
120121
QgsDebugMsg( "Entering." );
121122
stackedWidget->setCurrentIndex( 1 );
123+
leMasterPass->setFocus();
122124

123125
QString titletxt( stored ? tr( "Enter CURRENT master authentication password" ) : tr( "Set NEW master authentication password" ) );
124126
lblPasswordTitle->setText( titletxt );

‎src/ui/qgscredentialdialog.ui

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@ font-style: italic;
220220
</item>
221221
</layout>
222222
</widget>
223+
<tabstops>
224+
<tabstop>leUsername</tabstop>
225+
<tabstop>lePassword</tabstop>
226+
<tabstop>leMasterPass</tabstop>
227+
<tabstop>leMasterPassVerify</tabstop>
228+
<tabstop>chkMasterPassShow</tabstop>
229+
<tabstop>chkbxEraseAuthDb</tabstop>
230+
</tabstops>
223231
<resources/>
224232
<connections>
225233
<connection>

0 commit comments

Comments
 (0)
Please sign in to comment.