From a72e28935d88d569a64f3d08a8791b368dda11d7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Dec 2018 22:24:54 +0000 Subject: [PATCH] swaroop: fix phantom entries when loading/saving playlists. --- src/tools/dcpomatic_playlist.cc | 6 ++++-- 1 file 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_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); } -- 2.30.2