From cf7b8aab39ba81394ed91310c4886558529a8bff Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Sat, 25 Jul 2026 13:41:35 +0200 Subject: [PATCH] Preserve Cinema Path selection Commit 81c57e8a284 added support for adding and removing paths. Reloading path list stores the current selection but it's unused, assume the idea was to restore it again. Signed-off-by: Ralph Sennhauser --- .../AtlasUI/ScenarioEditor/Sections/Cinema/Cinema.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Cinema/Cinema.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Cinema/Cinema.cpp index 098dd8e13c..812b8e8ebc 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Cinema/Cinema.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Cinema/Cinema.cpp @@ -135,10 +135,7 @@ void CinemaSidebar::OnDeletePath(wxCommandEvent&) void CinemaSidebar::ReloadPathList() { - int index = m_PathList->GetSelection(); - wxString pathName; - if (index >= 0) - pathName = m_PathList->GetString(index); + const wxString selection = m_PathList->GetStringSelection(); AtlasMessage::qGetCinemaPaths query_paths; query_paths.Post(); @@ -146,6 +143,8 @@ void CinemaSidebar::ReloadPathList() m_PathList->Clear(); for (const AtlasMessage::sCinemaPath& path : *query_paths.paths) m_PathList->Append(*path.name); + + m_PathList->SetStringSelection(selection); } wxBEGIN_EVENT_TABLE(CinemaSidebar, Sidebar)