Skip to content

Commit

Permalink
#5461: PrefabSelector is expanding the top-level items in the treevie…
Browse files Browse the repository at this point in the history
…w after population
  • Loading branch information
codereader committed Dec 26, 2020
1 parent 2c552e7 commit 612e429
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions radiant/ui/prefabselector/PrefabSelector.cpp
Expand Up @@ -318,6 +318,7 @@ void PrefabSelector::setupTreeView(wxWindow* parent)
{
_treeView = wxutil::FileSystemView::Create(parent, wxBORDER_STATIC | wxDV_NO_HEADER);
_treeView->Bind(wxutil::EV_FSVIEW_SELECTION_CHANGED, &PrefabSelector::onSelectionChanged, this);
_treeView->signal_TreePopulated().connect(sigc::mem_fun(this, &PrefabSelector::onFileViewTreePopulated));

// Get the extensions from all possible patterns (e.g. *.pfb or *.pfbx)
FileTypePatterns patterns = GlobalFiletypes().getPatternsForType(filetype::TYPE_PREFAB);
Expand Down Expand Up @@ -472,4 +473,9 @@ void PrefabSelector::updateUsageInfo()
_description->SetValue(usage);
}

void PrefabSelector::onFileViewTreePopulated()
{
_treeView->ExpandTopLevelItems();
}

} // namespace ui
1 change: 1 addition & 0 deletions radiant/ui/prefabselector/PrefabSelector.h
Expand Up @@ -102,6 +102,7 @@ class PrefabSelector :
void onSelectionChanged(wxutil::FileSystemView::SelectionChangedEvent& ev);
void onPrefabPathSelectionChanged();
void onRescanPrefabs(wxCommandEvent& ev);
void onFileViewTreePopulated();

void onMainFrameShuttingDown();

Expand Down

0 comments on commit 612e429

Please sign in to comment.