diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-12-18 22:24:54 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-12-18 22:24:54 +0000 |
| commit | a72e28935d88d569a64f3d08a8791b368dda11d7 (patch) | |
| tree | f3c38c9fc6fca9f7270bb1166afc2de95fca9ef6 /src | |
| parent | 7c54ed611f2934a6dcb22816a9c2706a7ae58660 (diff) | |
swaroop: fix phantom entries when loading/saving playlists.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dcpomatic_playlist.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc index fe49a2610..0b8f935b3 100644 --- a/src/tools/dcpomatic_playlist.cc +++ b/src/tools/dcpomatic_playlist.cc @@ -161,7 +161,6 @@ private: item.SetId (_list->GetItemCount()); long const N = _list->InsertItem (item); set_item (N, e); - _playlist.add (e); } void selection_changed () @@ -230,7 +229,9 @@ private: if (r == wxID_OK) { shared_ptr<Content> content = _content_dialog->selected (); if (content) { - add (SPLEntry(content)); + SPLEntry e (content); + add (e); + _playlist.add (e); } } } @@ -295,6 +296,7 @@ private: _list->DeleteAllItems (); _playlist.read (wx_to_std(d->GetPath()), _content_dialog); if (!_playlist.missing()) { + _list->DeleteAllItems (); BOOST_FOREACH (SPLEntry i, _playlist.get()) { add (i); } |
