From 5681673da7de7c9581feaad248acc1ee37f59020 Mon Sep 17 00:00:00 2001 From: codereader Date: Sat, 3 Oct 2020 06:28:16 +0200 Subject: [PATCH] #5306: Remember the last selected sound before clearing the SoundChooser tree --- radiant/uimanager/SoundChooser.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/radiant/uimanager/SoundChooser.cpp b/radiant/uimanager/SoundChooser.cpp index a8bd52e8de..4512f036a4 100644 --- a/radiant/uimanager/SoundChooser.cpp +++ b/radiant/uimanager/SoundChooser.cpp @@ -363,8 +363,13 @@ int SoundChooser::ShowModal() void SoundChooser::_onReloadSounds(wxCommandEvent& ev) { + // Remember the last selected shader + _shaderToSelect = getSelectedShader(); + _preview->setSoundShader(std::string()); + // Send the command to the SoundManager + // After parsing it will fire the sounds reloaded signal => onShadersReloaded() GlobalCommandSystem().executeCommand("ReloadSounds"); _treeStore->Clear();