]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/AddBookmarkDialog.cpp
Focus the bookmark name when adding or editing bookmarks. https://redmine.stoutner...
[PrivacyBrowserPC.git] / src / dialogs / AddBookmarkDialog.cpp
index 9f977afabdcfed2f8ece0e02b89499d5e4b01b40..4c91c2c2138f7a84b9f445341bde5ad616f5be46 100644 (file)
@@ -94,10 +94,12 @@ AddBookmarkDialog::AddBookmarkDialog(const QString &bookmarkName, const QString
     bookmarkNameLineEditPointer->setText(bookmarkName);
     bookmarkUrlLineEditPointer->setText(bookmarkUrl);
 
-    // Scroll to the beginning of the line edits.
-    bookmarkNameLineEditPointer->setCursorPosition(0);
+    // Scroll to the beginning of the bookmark URL line edit.
     bookmarkUrlLineEditPointer->setCursorPosition(0);
 
+    // Focus the bookmark name line edit.
+    bookmarkNameLineEditPointer->setFocus();
+
     // Add buttons to the dialog button box.
     addButtonPointer = dialogButtonBoxPointer->addButton(i18nc("The add bookmark button", "Add"), QDialogButtonBox::AcceptRole);