mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 19:45:31 +01:00
Reset the model during init of CddaDevice
This ensures that the track list in the device tab is correctly updated when a disc is replaced with one that doesn't exist in the MusicBrainz database.
This commit is contained in:
parent
68d445fed2
commit
0be0498e94
@ -99,6 +99,10 @@ void CddaDevice::Init() {
|
|||||||
song_count_ = num_tracks;
|
song_count_ = num_tracks;
|
||||||
connect(this, SIGNAL(SongsDiscovered(const SongList&)), model_,
|
connect(this, SIGNAL(SongsDiscovered(const SongList&)), model_,
|
||||||
SLOT(SongsDiscovered(const SongList&)));
|
SLOT(SongsDiscovered(const SongList&)));
|
||||||
|
// Reset the model before emitting the SongsDiscovered signal. This
|
||||||
|
// ensures that the model is updated properly even when a disc that
|
||||||
|
// doesn't exist in MusicBrainz is inserted.
|
||||||
|
model_->Reset();
|
||||||
emit SongsDiscovered(songs);
|
emit SongsDiscovered(songs);
|
||||||
|
|
||||||
// Generate MusicBrainz DiscId
|
// Generate MusicBrainz DiscId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user