Skip to content

Commit

Permalink
Track: remove redundant changed signals when replacing track record
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Mar 15, 2024
1 parent 37e09ce commit c5f92d3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/track/track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ mixxx::TrackRecord Track::getRecord(
bool Track::replaceRecord(
mixxx::TrackRecord newRecord,
mixxx::BeatsPointer pOptionalBeats) {
const auto newKey = newRecord.getGlobalKey();
const auto newReplayGain = newRecord.getMetadata().getTrackInfo().getReplayGain();
const auto newColor = newRecord.getColor();
const auto newRating = newRecord.getRating();
Expand All @@ -299,7 +298,6 @@ bool Track::replaceRecord(
return false;
}

const auto oldKey = m_record.getGlobalKey();
const auto oldReplayGain = m_record.getMetadata().getTrackInfo().getReplayGain();
const auto oldColor = m_record.getColor();
const auto oldRating = m_record.getRating();
Expand Down Expand Up @@ -327,10 +325,7 @@ bool Track::replaceRecord(
markDirtyAndUnlock(&locked);

if (bpmUpdatedFlag) {
emitBeatsAndBpmUpdated();
}
if (oldKey != newKey) {
emit keyChanged();
emit beatsUpdated();
}
if (oldReplayGain != newReplayGain) {
emit replayGainUpdated(newReplayGain);
Expand Down

0 comments on commit c5f92d3

Please sign in to comment.