From d1f4dfb0b8a7f92c3365f6ce2abcb732846fbe08 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Wed, 9 Oct 2024 19:52:23 +0200 Subject: [PATCH] DocsDialog: don't close on pressing enter --- src/dialog/DocsDialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dialog/DocsDialog.cpp b/src/dialog/DocsDialog.cpp index c86d2f8..2591dff 100644 --- a/src/dialog/DocsDialog.cpp +++ b/src/dialog/DocsDialog.cpp @@ -134,6 +134,12 @@ DocsDialog::DocsDialog(QWidget *parent) this->updateHighlights(ui->search->text()); }); + // Pressing 'enter' in the search box shouldn't close the dialog + QPushButton *closeButton = ui->buttonBox->button(QDialogButtonBox::Close); + if (closeButton) { + closeButton->setAutoDefault(false); + } + this->showDoc("report_an_issue"); }