diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-28 16:23:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-28 16:23:22 +0100 |
| commit | d6825b500b89430cb018d311c090d794ec18faf3 (patch) | |
| tree | 0eea68cb4cb5906401d73b9f0a478a21acaa83b4 /src | |
| parent | cee15a64c0a4dff457d6743fc07af014faddd09e (diff) | |
Don't read DCP directory if we're not looking at it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/controls.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wx/controls.cc b/src/wx/controls.cc index df2c16134..a5cc1dcc4 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -510,6 +510,9 @@ void Controls::show_extended_player_controls (bool s) { _cpl->Show (s); + if (s) { + update_dcp_directory (); + } _spl_view->Show (s); _log->Show (s); _add_button->Show (s); @@ -550,6 +553,10 @@ Controls::add_cpl_to_list (shared_ptr<dcp::CPL> cpl, wxListCtrl* ctrl) void Controls::update_dcp_directory () { + if (!_cpl->IsShown()) { + return; + } + using namespace boost::filesystem; _cpl->DeleteAllItems (); |
