Fixed up DirectoryLayout's TrackList title.

This commit is contained in:
casey langen 2018-02-12 21:37:29 -08:00
parent acf9befb86
commit ab79b4bdbe

View File

@ -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);
}