diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-01 11:34:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-01 11:34:09 +0100 |
| commit | baed0f37f3cb3375f39b8d44f01eadb8796eb0d5 (patch) | |
| tree | 19d6f7ae57c47b26d6bd95f986b343d292bf233b /src/tools | |
| parent | 99cb0937e54340fa20c594aaa501276b8321cbf0 (diff) | |
Generalise the Changed message from SPL.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_playlist.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc index c327a8603..9eada8b38 100644 --- a/src/tools/dcpomatic_playlist.cc +++ b/src/tools/dcpomatic_playlist.cc @@ -166,22 +166,24 @@ private: void add_playlist_to_model (shared_ptr<SignalSPL> playlist) { _playlists.push_back (playlist); - playlist->NameChanged.connect (bind(&PlaylistList::name_changed, this, weak_ptr<SignalSPL>(playlist))); + playlist->Changed.connect(bind(&PlaylistList::changed, this, weak_ptr<SignalSPL>(playlist), _1)); } - void name_changed (weak_ptr<SignalSPL> wp) + void changed(weak_ptr<SignalSPL> wp, SignalSPL::Change change) { auto playlist = wp.lock (); if (!playlist) { return; } - int N = 0; - for (auto i: _playlists) { - if (i == playlist) { - _list->SetItem (N, 0, std_to_wx(i->name())); + if (change == SignalSPL::Change::NAME) { + int N = 0; + for (auto i: _playlists) { + if (i == playlist) { + _list->SetItem (N, 0, std_to_wx(i->name())); + } + ++N; } - ++N; } } |
