From 5cba1a11851d9a232fda573f1114723ada34d702 Mon Sep 17 00:00:00 2001 From: gurrgur <31393177+gurrgur@users.noreply.github.com> Date: Sat, 27 Aug 2022 05:33:30 +0200 Subject: [PATCH] gui: keep shown graphic pack when clicking on preset dropdown (#77) --- src/gui/GraphicPacksWindow2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/GraphicPacksWindow2.cpp b/src/gui/GraphicPacksWindow2.cpp index f46d8abe..a830cb72 100644 --- a/src/gui/GraphicPacksWindow2.cpp +++ b/src/gui/GraphicPacksWindow2.cpp @@ -421,6 +421,10 @@ void GraphicPacksWindow2::OnTreeSelectionChanged(wxTreeEvent& event) { 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(); if (selection.IsOk()) {