From 1544d5d3a6fa4db819975d0cda6afc20ec0987a2 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sat, 21 May 2022 17:06:07 +0300 Subject: [PATCH] Fix sound in the sound list using the alias of the sound list as the sound instead of its actual reference (#708) --- src/courtroom.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index bd9519c..f6fe799 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -4517,7 +4517,7 @@ void Courtroom::set_sfx_dropdown() // Append default sound list after the character sound list. sound_list += ao_app->get_list_file( - ao_app->get_base_path() + "soundlist.ini"); + ao_app->get_base_path() + "soundlist.ini"); QStringList display_sounds; for (const QString &sound : qAsConst(sound_list)) { @@ -4540,10 +4540,10 @@ void Courtroom::set_sfx_dropdown() void Courtroom::on_sfx_dropdown_changed(int p_index) { + custom_sfx = ""; ui_ic_chat_message->setFocus(); if (p_index == 0) { ui_sfx_remove->hide(); - custom_sfx = ""; } } @@ -4692,8 +4692,9 @@ QString Courtroom::get_char_sfx() if (index == 0) { // Default return ao_app->get_sfx_name(current_char, current_emote); } - if (index == 1) // Nothing + if (index == 1) { // Nothing return "1"; + } QString sfx = sound_list[index-2].split("=")[0].trimmed(); if (sfx == "") return "1";