Skip to content

Commit

Permalink
DlgTrackInfo: prevent wipe when quickly applying twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Mar 13, 2024
1 parent e2d4199 commit b670249
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/library/dlgtrackinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,13 @@ void DlgTrackInfo::saveTrack() {
slotSpinBpmValueChanged(spinBpm->value());
static_cast<void>(updateKeyText()); // discard result

// Don't update if nothing changed. This prevents wiping the record
// when calling this function twice quickly.
// See https://github.com/mixxxdj/mixxx/issues/12963
if (m_trackRecord == m_pLoadedTrack->getRecord()) {
return;
}

// Update the cached track
// The dialog is updated and repopulated by the Track::changed() signal.
m_pLoadedTrack->replaceRecord(std::move(m_trackRecord), std::move(m_pBeatsClone));
Expand Down

0 comments on commit b670249

Please sign in to comment.