SetActiveToCurrent: Check if the playlist changed. If not, then do not call SetActivePlaylist().
This commit is contained in:
parent
b9ff2dc46d
commit
329a91c265
|
@ -252,6 +252,16 @@ void PlaylistManager::SetActivePlaylist(int id) {
|
||||||
sequence_->SetUsingDynamicPlaylist(active()->is_dynamic());
|
sequence_->SetUsingDynamicPlaylist(active()->is_dynamic());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlaylistManager::SetActiveToCurrent() {
|
||||||
|
// Check if we need to update the active playlist.
|
||||||
|
// By calling SetActiveToCurrent, the playlist manager emits the signal
|
||||||
|
// "ActiveChanged". This signal causes the network remote module to
|
||||||
|
// send all playlists to the clients, even no change happend.
|
||||||
|
if (current_id() != active_id()) {
|
||||||
|
SetActivePlaylist(current_id());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void PlaylistManager::ClearCurrent() {
|
void PlaylistManager::ClearCurrent() {
|
||||||
current()->Clear();
|
current()->Clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ public slots:
|
||||||
|
|
||||||
void SetCurrentPlaylist(int id);
|
void SetCurrentPlaylist(int id);
|
||||||
void SetActivePlaylist(int id);
|
void SetActivePlaylist(int id);
|
||||||
void SetActiveToCurrent() { SetActivePlaylist(current_id()); }
|
void SetActiveToCurrent();
|
||||||
|
|
||||||
void SelectionChanged(const QItemSelection& selection);
|
void SelectionChanged(const QItemSelection& selection);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue