From 1c1651be2ebf087f11479c7a1e07d944bc72ceab Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 10 Feb 2012 16:13:59 +0000 Subject: insert new playlist at the end of playlists list git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2592 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistmanager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qmmpui/playlistmanager.cpp b/src/qmmpui/playlistmanager.cpp index 474d268ac..eeb18aa21 100644 --- a/src/qmmpui/playlistmanager.cpp +++ b/src/qmmpui/playlistmanager.cpp @@ -167,12 +167,11 @@ PlayListModel *PlayListManager::createPlayList(const QString &name) } model->setName(pl_name); } - int i = m_models.indexOf(m_selected); - m_models.insert(i+1, model); + m_models.append(model); model->prepareForRepeatablePlaying(m_repeatable); model->prepareForShufflePlaying(m_shuffle); connect(model, SIGNAL(nameChanged(QString)), SIGNAL(playListsChanged())); - emit playListAdded(i+1); + emit playListAdded(m_models.indexOf(model)); emit playListsChanged(); return model; } -- cgit v1.2.3-13-gbd6f