Skip to content

Commit

Permalink
Merge pull request mixxxdj#14020 from ronso0/keytext-trackinfo
Browse files Browse the repository at this point in the history
(fix) Track Info: show key text as in tracks table
  • Loading branch information
daschuer authored Dec 17, 2024
2 parents a5b51ce + 08236b7 commit 938cc31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/library/dlgtrackinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,12 @@ mixxx::UpdateResult DlgTrackInfo::updateKeyText() {
}

void DlgTrackInfo::displayKeyText() {
const QString keyText = KeyUtils::keyToString(m_trackRecord.getKeys().getGlobalKey());
QString keyText;
if (m_pLoadedTrack) {
keyText = KeyUtils::keyFromKeyTextAndIdValues(
m_pLoadedTrack->getKeyText(),
m_pLoadedTrack->getKey());
}
txtKey->setText(keyText);
}

Expand Down
6 changes: 5 additions & 1 deletion src/library/dlgtrackinfomulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,11 @@ void DlgTrackInfoMulti::updateTrackMetadataFields() {
composers.insert(rec.getMetadata().getTrackInfo().getComposer());
grouping.insert(rec.getMetadata().getTrackInfo().getGrouping());
years.insert(rec.getMetadata().getTrackInfo().getYear());
keys.insert(KeyUtils::keyToString(rec.getKeys().getGlobalKey()));
auto pTrack = getTrackFromSetById(rec.getId());
DEBUG_ASSERT(pTrack);
keys.insert(KeyUtils::keyFromKeyTextAndIdValues(
pTrack->getKeyText(),
pTrack->getKey()));
nums.insert(rec.getMetadata().getTrackInfo().getTrackNumber());
comments.insert(rec.getMetadata().getTrackInfo().getComment());

Expand Down

0 comments on commit 938cc31

Please sign in to comment.