From 70f7fa7104767d9b9cb589a52765a6530bb276f5 Mon Sep 17 00:00:00 2001 From: codereader Date: Sun, 18 Sep 2022 10:32:17 +0200 Subject: [PATCH] #5537: ResourceTreeView finished event should propagate upwards --- libs/wxutil/dataview/ResourceTreeView.cpp | 4 +++- radiant/ui/common/SkinChooser.cpp | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/wxutil/dataview/ResourceTreeView.cpp b/libs/wxutil/dataview/ResourceTreeView.cpp index 1eb31f25ef..0833061c60 100644 --- a/libs/wxutil/dataview/ResourceTreeView.cpp +++ b/libs/wxutil/dataview/ResourceTreeView.cpp @@ -20,7 +20,9 @@ namespace // Event implementation ResourceTreeView::PopulationFinishedEvent::PopulationFinishedEvent(int id) : wxEvent(id, EV_TREEVIEW_POPULATION_FINISHED) -{} +{ + m_propagationLevel = wxEVENT_PROPAGATE_MAX; +} ResourceTreeView::PopulationFinishedEvent::PopulationFinishedEvent(const PopulationFinishedEvent& event) : wxEvent(event) diff --git a/radiant/ui/common/SkinChooser.cpp b/radiant/ui/common/SkinChooser.cpp index d11292d734..1272a1fc06 100644 --- a/radiant/ui/common/SkinChooser.cpp +++ b/radiant/ui/common/SkinChooser.cpp @@ -213,6 +213,8 @@ class SkinSelector : // Make sure the "matching skins" item is expanded GetTreeView()->Expand(_matchingSkinsItem); GetTreeView()->Collapse(_allSkinsItem); + + ev.Skip(); } }; @@ -232,6 +234,7 @@ void SkinChooser::populateWindow() GetSizer()->Add(vbox, 1, wxEXPAND | wxALL, 12); _selector = new SkinSelector(this, _model); + _selector->Bind(wxutil::EV_TREEVIEW_POPULATION_FINISHED, &SkinChooser::_onTreeViewPopulationFinished, this); #if 0 wxSplitterWindow* splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition,