From 62114bba62024d81c3d176c17abd942b188bf1f6 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 22 Nov 2009 21:05:27 +0000 Subject: fixed playlist settings update git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1397 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/playlistmodel.cpp | 4 ++-- src/ui/display.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index 6934c2c42..3afa743fa 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -111,10 +111,10 @@ void PlayListModel::add(PlayListItem *item) m_total_length += item->length(); m_items << item; + m_current = m_items.indexOf(m_currentItem); if (m_items.size() == 1) - emit firstAdded(); - m_current = m_items.indexOf(m_currentItem); + emit firstAdded(); emit listChanged(); } diff --git a/src/ui/display.cpp b/src/ui/display.cpp index fab49fbf9..c8c619541 100644 --- a/src/ui/display.cpp +++ b/src/ui/display.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "skin.h" #include "mainvisual.h" #include "button.h" @@ -114,9 +114,9 @@ MainDisplay::MainDisplay (QWidget *parent) connect(m_core, SIGNAL(stateChanged(Qmmp::State)), SLOT(setState(Qmmp::State))); connect(m_core, SIGNAL(volumeChanged(int,int)), SLOT(setVolume(int, int))); connect(m_core, SIGNAL(elapsedChanged(qint64)),m_titlebar, SLOT(setTime(qint64))); - /*PlayListModel *model = MediaPlayer::instance()->playListModel(); - connect(model, SIGNAL(repeatableListChanged(bool)), m_repeatButton, SLOT(setON(bool))); - connect(model, SIGNAL(shuffleChanged(bool)), m_shuffleButton, SLOT(setON(bool)));*/ + PlayListManager *pl_manager = MediaPlayer::instance()->playListManager(); + connect(pl_manager, SIGNAL(repeatableListChanged(bool)), m_repeatButton, SLOT(setON(bool))); + connect(pl_manager, SIGNAL(shuffleChanged(bool)), m_shuffleButton, SLOT(setON(bool))); updatePositions(); updateMask(); } -- cgit v1.2.3-13-gbd6f