summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2020-10-30 19:36:16 +0100
committerGitHub <noreply@github.com>2020-10-30 19:36:16 +0100
commite10a8270a1f51661c0097626c5fea5aa1df56c8f (patch)
tree5989fbbd609badf42116d36a5993c8aa8f6a7a09
parentde702d279640371c630f9cfa2fbfa3ac844d4683 (diff)
parentbcca0770ef036c840f0e48e2047212eaff697a73 (diff)
Merge pull request #3199 from ronso0/gotoitem-qdialog-enter
Librarycontrol: allow [Library],GoToItem press dialog buttons
-rw-r--r--src/library/librarycontrol.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library/librarycontrol.cpp b/src/library/librarycontrol.cpp
index c1562631ee..91ec465f45 100644
--- a/src/library/librarycontrol.cpp
+++ b/src/library/librarycontrol.cpp
@@ -652,6 +652,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