From 33b8a3deca95b0cc17798c7cde6e9bb84e0062c5 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 26 Mar 2010 14:53:55 +0000 Subject: some api changes git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1644 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistmanager.cpp | 3 ++- src/qmmpui/playlistmanager.h | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/qmmpui/playlistmanager.cpp b/src/qmmpui/playlistmanager.cpp index c755ecc42..4956f008f 100644 --- a/src/qmmpui/playlistmanager.cpp +++ b/src/qmmpui/playlistmanager.cpp @@ -148,11 +148,12 @@ void PlayListManager::removePlayList(PlayListModel *model) void PlayListManager::move(int i, int j) { - if(i < 0 || j < 0) + if(i < 0 || j < 0 || i == j) return; if(i < m_models.count() && j < m_models.count()) { m_models.move(i,j); + emit playListMoved(i,j); emit playListsChanged(); } } diff --git a/src/qmmpui/playlistmanager.h b/src/qmmpui/playlistmanager.h index d652b6e38..6fde5864a 100644 --- a/src/qmmpui/playlistmanager.h +++ b/src/qmmpui/playlistmanager.h @@ -134,6 +134,10 @@ signals: * Emitted when the playlist with index \b index is removed. */ void playListRemoved(int index); + /*! + * Emitted when playlist changes its position from \b i to \b j. + */ + void playListMoved(int i, int j); /*! * Emitted when the list of playlists is changed. */ -- cgit v1.2.3-13-gbd6f