Skip to content

Commit

Permalink
Fix initial widget focus in credential dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 23, 2016
1 parent defd738 commit 4d48072
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/qgscredentialdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ QgsCredentialDialog::QgsCredentialDialog( QWidget *parent, const Qt::WindowFlags
Qt::BlockingQueuedConnection );
mOkButton = buttonBox->button( QDialogButtonBox::Ok );
leMasterPass->setPlaceholderText( tr( "Required" ) );
leUsername->setFocus();
}

QgsCredentialDialog::~QgsCredentialDialog()
Expand Down Expand Up @@ -119,6 +120,7 @@ void QgsCredentialDialog::requestCredentialsMasterPassword( QString * password,
{
QgsDebugMsg( "Entering." );
stackedWidget->setCurrentIndex( 1 );
leMasterPass->setFocus();

QString titletxt( stored ? tr( "Enter CURRENT master authentication password" ) : tr( "Set NEW master authentication password" ) );
lblPasswordTitle->setText( titletxt );
Expand Down
8 changes: 8 additions & 0 deletions src/ui/qgscredentialdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ font-style: italic;
</item>
</layout>
</widget>
<tabstops>
<tabstop>leUsername</tabstop>
<tabstop>lePassword</tabstop>
<tabstop>leMasterPass</tabstop>
<tabstop>leMasterPassVerify</tabstop>
<tabstop>chkMasterPassShow</tabstop>
<tabstop>chkbxEraseAuthDb</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
Expand Down

0 comments on commit 4d48072

Please sign in to comment.