aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/playlistmanager.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2012-02-10 16:13:59 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2012-02-10 16:13:59 +0000
commit1c1651be2ebf087f11479c7a1e07d944bc72ceab (patch)
tree34712b1ced98a6c8c43fd7c9cca91154bd3228d2 /src/qmmpui/playlistmanager.cpp
parent4f265dd2f42bd1caf4c963b5dfac7e839351f3a1 (diff)
downloadqmmp-1c1651be2ebf087f11479c7a1e07d944bc72ceab.tar.gz
qmmp-1c1651be2ebf087f11479c7a1e07d944bc72ceab.tar.bz2
qmmp-1c1651be2ebf087f11479c7a1e07d944bc72ceab.zip
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
Diffstat (limited to 'src/qmmpui/playlistmanager.cpp')
-rw-r--r--src/qmmpui/playlistmanager.cpp5
1 files 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;
}