Skip to content

Commit

Permalink
DlgTrackInfoMulti: remove clear(), it's not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed May 20, 2024
1 parent 2aaa433 commit ff871eb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion src/library/dlgtrackinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void DlgTrackInfo::slotApply() {
}

void DlgTrackInfo::slotOk() {
slotApply();
saveTrack();
clear();
accept();
}
Expand Down
18 changes: 0 additions & 18 deletions src/library/dlgtrackinfomulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,23 +290,18 @@ void DlgTrackInfoMulti::slotApply() {

void DlgTrackInfoMulti::slotOk() {
slotApply();
clear();
accept();
}

void DlgTrackInfoMulti::slotCancel() {
clear();
reject();
}

void DlgTrackInfoMulti::loadTracks(const QList<TrackPointer>& pTracks) {
clear();

if (pTracks.isEmpty()) {
return;
}

m_pLoadedTracks.clear();
for (const auto& pTrack : pTracks) {
m_pLoadedTracks.insert(pTrack.get()->getId(), pTrack);
}
Expand Down Expand Up @@ -676,19 +671,6 @@ void DlgTrackInfoMulti::saveTracks() {
updateFromTracks();
}

void DlgTrackInfoMulti::clear() {
const QSignalBlocker signalBlocker(this);

disconnectTracksChanged();
m_pLoadedTracks.clear();
m_trackRecords.clear();

m_pWStarRating->slotSetRating(0);
trackColorDialogSetColorStyleButton(mixxx::RgbColor::nullopt());
m_pWCoverArtLabel->loadTrack(TrackPointer());
m_pWCoverArtLabel->setCoverArt(CoverInfo(), QPixmap());
}

void DlgTrackInfoMulti::connectTracksChanged() {
for (const auto& pTrack : std::as_const(m_pLoadedTracks)) {
connect(pTrack.get(),
Expand Down
1 change: 0 additions & 1 deletion src/library/dlgtrackinfomulti.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class DlgTrackInfoMulti : public QDialog, public Ui::DlgTrackInfoMulti {
void init();
void loadTracksInternal(const QList<TrackPointer>& pTracks);
void saveTracks();
void clear();

void connectTracksChanged();
void disconnectTracksChanged();
Expand Down

0 comments on commit ff871eb

Please sign in to comment.