From bcca0770ef036c840f0e48e2047212eaff697a73 Mon Sep 17 00:00:00 2001 From: ronso0 Date: Wed, 21 Oct 2020 23:58:03 +0200 Subject: Librarycontrol: allow [Library],GoToItem press dialog buttons --- src/library/librarycontrol.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/library/librarycontrol.cpp b/src/library/librarycontrol.cpp index e3c573771c..94073c6ef0 100644 --- a/src/library/librarycontrol.cpp +++ b/src/library/librarycontrol.cpp @@ -643,6 +643,13 @@ void LibraryControl::slotGoToItem(double v) { // Clear the search if the searchbox has focus emit clearSearchIfClearButtonHasFocus(); + // If the focused window is a dialog, press Enter + auto focusWindow = QApplication::focusWindow(); + if (focusWindow && (focusWindow->type() & (Qt::Dialog | Qt::Popup))) { + QKeyEvent event(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier); + QApplication::sendEvent(focusWindow, &event); + } + // TODO(xxx) instead of remote control the widgets individual, we should // translate this into Alt+Return and handle it at each library widget // individual https://bugs.launchpad.net/mixxx/+bug/1758618 -- cgit v1.2.3