From ab79b4bdbec6becf004980c8b65d7bb95408232c Mon Sep 17 00:00:00 2001 From: casey langen Date: Mon, 12 Feb 2018 21:37:29 -0800 Subject: [PATCH] Fixed up DirectoryLayout's TrackList title. --- src/musikcube/app/layout/DirectoryLayout.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/musikcube/app/layout/DirectoryLayout.cpp b/src/musikcube/app/layout/DirectoryLayout.cpp index 40e0d4db5..213e092bc 100644 --- a/src/musikcube/app/layout/DirectoryLayout.cpp +++ b/src/musikcube/app/layout/DirectoryLayout.cpp @@ -177,9 +177,15 @@ void DirectoryLayout::OnDirectoryChanged( } void DirectoryLayout::UpdateTitle() { - std::string title = - _TSTR("browse_title_directory_tracks") + - this->adapter->GetCurrentPath(); + std::string title = _TSTR("browse_title_tracks"); + + size_t selected = this->directoryList->GetSelectedIndex(); + if (selected != ListWindow::NO_SELECTION) { + std::string fullPath = this->adapter->GetFullPathAt(selected); + if (fullPath.size()) { + title = _TSTR("browse_title_directory_tracks") + fullPath; + } + } this->trackList->SetFrameTitle(title); }