From 3a965fcd45d585c7e49afcc4b0d2e2d6ef8fe1f5 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 15 Dec 2012 09:55:53 +0000 Subject: added playlists auto-save feauture (patch by Ferdinand Vesely) (Closes issue 536), changed playlist api git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3063 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Ui/skinned/listwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/plugins/Ui/skinned/listwidget.cpp') diff --git a/src/plugins/Ui/skinned/listwidget.cpp b/src/plugins/Ui/skinned/listwidget.cpp index a296ac53c..a327cc127 100644 --- a/src/plugins/Ui/skinned/listwidget.cpp +++ b/src/plugins/Ui/skinned/listwidget.cpp @@ -148,7 +148,7 @@ void ListWidget::paintEvent(QPaintEvent *) } } - if (m_model->currentRow() == i + m_first) + if (m_model->currentIndex() == i + m_first) m_painter.setPen(m_current); else m_painter.setPen(m_normal); //243,58 @@ -459,7 +459,7 @@ const QString ListWidget::getExtraString(int i) extra_string += "|"+QString::number(index + 1)+"|"; } - if(m_model->currentRow() == i && m_player->isRepeatable()) + if(m_model->currentIndex() == i && m_player->isRepeatable()) extra_string += "|R|"; else if(m_model->isStopAfter(m_model->item(i))) extra_string += "|S|"; @@ -557,10 +557,10 @@ void ListWidget::recenterCurrent() { if (!m_scroll && m_rows) { - if (m_first + m_rows < m_model->currentRow() + 1) + if (m_first + m_rows < m_model->currentIndex() + 1) m_first = qMin(m_model->count() - m_rows, - m_model->currentRow() - m_rows/2); - else if (m_first > m_model->currentRow()) - m_first = qMax (m_model->currentRow() - m_rows/2, 0); + m_model->currentIndex() - m_rows/2); + else if (m_first > m_model->currentIndex()) + m_first = qMax (m_model->currentIndex() - m_rows/2, 0); } } -- cgit v1.2.3-13-gbd6f