aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwindrammer <31085911+likeawindrammer@users.noreply.github.com>2020-07-29 16:07:55 -0600
committerGitHub <noreply@github.com>2020-07-29 17:07:55 -0500
commit58180371efb781c247304452cd282b853dc97dad (patch)
tree0f230275be7473104b24cf7b34181af5b0e8887c /src
parent314fc821fe089b14b736c15d1a73edd117555c72 (diff)
Hitting return on blank search box should collapse music list (#205)
* If enter is hit with no query it collapses the music list Co-authored-by: Cents02 <Cents02@Cents0.me>
Diffstat (limited to 'src')
-rw-r--r--src/courtroom.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 5d38f8bc..0991a52a 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -322,6 +322,8 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
connect(ui_effects_dropdown, SIGNAL(customContextMenuRequested(QPoint)), this,
SLOT(on_effects_context_menu_requested(QPoint)));
+ connect(ui_music_search, SIGNAL(returnPressed()), this,
+ SLOT(on_music_search_return_pressed()));
connect(ui_mute_list, SIGNAL(clicked(QModelIndex)), this,
SLOT(on_mute_list_clicked(QModelIndex)));
@@ -3552,6 +3554,13 @@ void Courtroom::on_music_search_edited(QString p_text)
}
}
+void Courtroom::on_music_search_return_pressed()
+{
+ if (ui_music_search->text() == "") {
+ ui_music_list->collapseAll();
+ }
+}
+
void Courtroom::on_pos_dropdown_changed(int p_index)
{
if (p_index < 0 || p_index > 7)