Commit 40999732 authored by Ilkka Ollakka's avatar Ilkka Ollakka

Qt4: coverflow, only do animation if target is under 100 items away

It seems to take about 10s to scroll 100 items in my pc, and any longer than
that is just way too slow.
parent 51d4ac7c
......@@ -403,7 +403,11 @@ QRect PicFlowView::visualRect(const QModelIndex &index ) const
void PicFlowView::scrollTo(const QModelIndex &index, QAbstractItemView::ScrollHint)
{
picFlow->showSlide( index.row()-1 );
int currentIndex = picFlow->centerIndex();
if( qAbs( currentIndex - index.row()) > 100 )
picFlow->setCenterIndex( index.row()-1);
else
picFlow->showSlide( index.row()-1 );
}
QModelIndex PicFlowView::indexAt(const QPoint &) const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment