diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2012-12-15 09:55:53 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2012-12-15 09:55:53 +0000 |
| commit | 3a965fcd45d585c7e49afcc4b0d2e2d6ef8fe1f5 (patch) | |
| tree | d9ff3cd9621804632dca6001ad20ffb5f52de3f8 /src/plugins/Ui/skinned/listwidget.cpp | |
| parent | f31d9ccf3dda970ce2f4139a8c2ab205759c5523 (diff) | |
| download | qmmp-3a965fcd45d585c7e49afcc4b0d2e2d6ef8fe1f5.tar.gz qmmp-3a965fcd45d585c7e49afcc4b0d2e2d6ef8fe1f5.tar.bz2 qmmp-3a965fcd45d585c7e49afcc4b0d2e2d6ef8fe1f5.zip | |
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
Diffstat (limited to 'src/plugins/Ui/skinned/listwidget.cpp')
| -rw-r--r-- | src/plugins/Ui/skinned/listwidget.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } |
