Skip to content

Commit

Permalink
#4764: Close popup when focusing a non-browser element in the tree view
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Nov 11, 2022
1 parent 4462154 commit eb819cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions radiant/ui/mediabrowser/MediaBrowser.cpp
Expand Up @@ -53,6 +53,8 @@ MediaBrowser::~MediaBrowser()

void MediaBrowser::closePopup()
{
_showThumbnailBrowserOnIdle = false;

if (!_browserPopup.get()) return;

if (!wxTheApp->IsScheduledForDestruction(_browserPopup.get()))
Expand Down Expand Up @@ -258,6 +260,8 @@ void MediaBrowser::_onTreeViewSelectionChanged(wxDataViewEvent& ev)
if (!_treeView->IsDirectorySelected())
{
_preview->SetPreviewDeclName(getSelection());
// Close any pending popups
closePopup();
}
else
{
Expand Down

0 comments on commit eb819cd

Please sign in to comment.