Stack default soundlist after the character soundlist instead of making the character soundlist overwrite the default (#411)

This commit is contained in:
Crystalwarrior 2021-01-18 17:39:13 +03:00 committed by GitHub
parent c42496e204
commit 5786694b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4324,13 +4324,13 @@ void Courtroom::set_sfx_dropdown()
ui_sfx_remove->hide(); ui_sfx_remove->hide();
return; return;
} }
// Initialzie character sound list first. Will be empty if not found.
sound_list = ao_app->get_list_file( sound_list = ao_app->get_list_file(
ao_app->get_character_path(current_char, "soundlist.ini")); ao_app->get_character_path(current_char, "soundlist.ini"));
if (sound_list.size() <= 0) { // Append default sound list after the character sound list.
sound_list = ao_app->get_list_file( sound_list += ao_app->get_list_file(
ao_app->get_base_path() + "soundlist.ini"); ao_app->get_base_path() + "soundlist.ini");
}
QStringList display_sounds; QStringList display_sounds;
for (QString sound : sound_list) { for (QString sound : sound_list) {