gui: keep shown graphic pack when clicking on preset dropdown (#77)

This commit is contained in:
gurrgur 2022-08-27 05:33:30 +02:00 committed by GitHub
parent 664e6684b8
commit 5cba1a1185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -421,6 +421,10 @@ void GraphicPacksWindow2::OnTreeSelectionChanged(wxTreeEvent& event)
{ {
wxWindowUpdateLocker lock(this); wxWindowUpdateLocker lock(this);
bool item_deselected = m_graphic_pack_tree->GetSelection() == m_graphic_pack_tree->GetRootItem();
if (item_deselected)
return;
const auto selection = m_graphic_pack_tree->GetSelection(); const auto selection = m_graphic_pack_tree->GetSelection();
if (selection.IsOk()) if (selection.IsOk())
{ {