Show content path in the audio dialog title bar when looking at a single piece of...
authorCarl Hetherington <cth@carlh.net>
Thu, 15 Apr 2021 21:58:12 +0000 (23:58 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 15 Apr 2021 23:11:04 +0000 (01:11 +0200)
src/wx/audio_dialog.cc

index f4b4b2577c67b97f85e702f55f584f030ee54cfc..9e0d7a30fc197662d40357f313fea93f7f926082 100644 (file)
@@ -161,7 +161,11 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, weak_ptr<Film
        _film_connection = film->Change.connect (boost::bind(&AudioDialog::film_change, this, _1, _2));
        _film_content_connection = film->ContentChange.connect(boost::bind(&AudioDialog::content_change, this, _1, _3));
        DCPOMATIC_ASSERT (film->directory());
-       SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(film->directory().get().string())));
+       if (content) {
+               SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(content->path(0).string())));
+       } else {
+               SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(film->directory().get().string())));
+       }
 
        if (content) {
                _playlist = make_shared<Playlist>();