Skip to content

Commit

Permalink
(fix) DlgTagFetcher: fix UI when no track is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Sep 23, 2024
1 parent 5bd4c20 commit 7cbc4bd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/library/dlgtagfetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,30 +246,31 @@ void DlgTagFetcher::slotPrev() {
}

void DlgTagFetcher::loadTrack(const TrackPointer& pTrack) {
tags->clear();
m_data = Data();
if (m_pTrack) {
tags->clear();
disconnect(m_pTrack.get(),
&Track::changed,
this,
&DlgTagFetcher::slotTrackChanged);
m_data = Data();
}
tags->clear();

m_pWFetchedCoverArtLabel->setCoverArt(CoverInfo{}, QPixmap{});

m_coverCache.clear();

m_pTrack = pTrack;
if (!m_pTrack) {
return;
}

btnRetry->setDisabled(true);
btnApply->setDisabled(true);
checkBoxTags->setDisabled(true);
checkBoxCover->setDisabled(true);
statusMessage->setVisible(false);

m_pTrack = pTrack;
if (!m_pTrack) {
loadingProgressBar->setVisible(false);
return;
}

loadingProgressBar->setVisible(true);
loadingProgressBar->setValue(kMinimumValueOfQProgressBar);
addDivider(tr("Original tags"), tags);
Expand Down

0 comments on commit 7cbc4bd

Please sign in to comment.