scenedit always play sounds when working with sounds

This commit is contained in:
2025-06-18 11:37:24 -05:00
parent ab497f1b1d
commit 7ed3f36351
6 changed files with 8 additions and 7 deletions

View File

@@ -3968,7 +3968,7 @@ static bool edit_custom_sound_action(cDialog& me, std::string action, std::vecto
return true;
}
if(action == "play") {
play_sound(-which_snd);
force_play_sound(-which_snd);
} else if(action == "del") {
if(which_snd - 100 < snd_names.size())
snd_names[which_snd - 100].clear();

View File

@@ -1044,7 +1044,7 @@ snd_num_t choose_sound(short cur, cDialog* parent, std::string title) {
std::copy(scenario.snd_names.begin(), scenario.snd_names.end(), std::back_inserter(snd_names));
cStringChoice snd_dlg(snd_names, title, parent);
snd_dlg.attachSelectHandler([](cStringChoice&, int n) {
play_sound(-n);
force_play_sound(-n);
});
short sel = snd_dlg.show(cur);
if(snd_dlg->accepted()) return sel;