From d5bbd7582865789cc6b724c73cfa8ff9a2ff6d0d Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 12 May 2024 12:31:00 +0400 Subject: [PATCH] Make sure that Open button becomes focused after enabling --- apps/opencs/view/doc/filedialog.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/opencs/view/doc/filedialog.cpp b/apps/opencs/view/doc/filedialog.cpp index 1b502c9d6c..7040c359e2 100644 --- a/apps/opencs/view/doc/filedialog.cpp +++ b/apps/opencs/view/doc/filedialog.cpp @@ -177,6 +177,8 @@ void CSVDoc::FileDialog::slotUpdateAcceptButton(const QString& name, bool) mAdjusterWidget->setName("", true); ui.projectButtonBox->button(QDialogButtonBox::Ok)->setEnabled(success); + if (success) + ui.projectButtonBox->button(QDialogButtonBox::Ok)->setFocus(); } QString CSVDoc::FileDialog::filename() const