Preserve Cinema Path selection

Commit 81c57e8a28 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 <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser 2026-07-25 13:41:35 +02:00
parent df06b6895e
commit cf7b8aab39
No known key found for this signature in database

View file

@ -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)