[vlc-commits] commit: Qt4: small buggy test if modelinder is hidden or now ( Ilkka Ollakka )

git at videolan.org git at videolan.org
Sat Oct 30 21:55:29 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sat Oct 30 22:54:24 2010 +0300| [51d4ac7c2b2cf581fda4feb6ae430e0ddac93f1a] | committer: Ilkka Ollakka 

Qt4: small buggy test if modelinder is hidden or now

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=51d4ac7c2b2cf581fda4feb6ae430e0ddac93f1a
---

 modules/gui/qt4/components/playlist/views.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/views.cpp b/modules/gui/qt4/components/playlist/views.cpp
index 4d0f528..046d775 100644
--- a/modules/gui/qt4/components/playlist/views.cpp
+++ b/modules/gui/qt4/components/playlist/views.cpp
@@ -416,9 +416,14 @@ QModelIndex PicFlowView::moveCursor(QAbstractItemView::CursorAction action, Qt::
 {
 }
 
-bool PicFlowView::isIndexHidden(const QModelIndex &) const
+bool PicFlowView::isIndexHidden(const QModelIndex &index) const
 {
-    return false;
+    int currentIndex = picFlow->centerIndex();
+    if( index.row()-5 <= currentIndex &&
+        index.row()+5 >= currentIndex )
+        return false;
+    else
+        return true;
 }
 
 QRegion PicFlowView::visualRegionForSelection(const QItemSelection &) const



More information about the vlc-commits mailing list