diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2022-05-21 17:06:07 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-21 16:06:07 +0200 |
| commit | 1544d5d3a6fa4db819975d0cda6afc20ec0987a2 (patch) | |
| tree | f1e70dd4ec86ff3d8b7330c801fb138978e821ce | |
| parent | 6d1c8fd56004a04ae3644341c01b62db31a8afcc (diff) | |
Fix sound in the sound list using the alias of the sound list as the sound instead of its actual reference (#708)
| -rw-r--r-- | src/courtroom.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index bd9519c8..f6fe7995 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"; |
