diff options
| author | Emmanuel Pescosta <[email protected]> | 2015-09-06 16:34:41 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2015-09-07 22:58:38 +0200 |
| commit | 4143a69c05be6da8a91c8ba0db505a47b22ddc75 (patch) | |
| tree | 18a0e8832f5d6df40051d19c69797dc5ab779d5b /src/views/renamedialog.cpp | |
| parent | 389c909affddb127b2e7af35422c21e55c0485b9 (diff) | |
Rename dialog: Set focus to input text box on dialog show event.
BUG: 351708
FIXED-IN: 15.08.1
REVIEW: 125078
Diffstat (limited to 'src/views/renamedialog.cpp')
| -rw-r--r-- | src/views/renamedialog.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index be9e34c4a..60b7b16c1 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -108,7 +108,6 @@ RenameDialog::RenameDialog(QWidget *parent, const KFileItemList& items) : m_lineEdit->setText(m_newName); m_lineEdit->setSelection(0, selectionLength); - m_lineEdit->setFocus(); topLayout->addWidget(editLabel); topLayout->addWidget(m_lineEdit); @@ -197,6 +196,13 @@ void RenameDialog::slotTextChanged(const QString& newName) m_okButton->setEnabled(enable); } +void RenameDialog::showEvent(QShowEvent* event) +{ + m_lineEdit->setFocus(); + + QDialog::showEvent(event); +} + void RenameDialog::renameItems() { // Iterate through all items and rename them... |
