From kde-commits Fri Feb 25 08:23:28 2011 From: Sebastian Trueg Date: Fri, 25 Feb 2011 08:23:28 +0000 To: kde-commits Subject: playground/base/nepomuk-kde/annotation/lib/gui Message-Id: <20110225082328.3CA0AAC8C0 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=129862223509168 SVN commit 1222681 by trueg: Always keep the selection on the first item if the user did not navigate yet. M +1 -1 annotationwidget.cpp --- trunk/playground/base/nepomuk-kde/annotation/lib/gui/annotationwidget.cpp #1222680:1222681 @@ -85,10 +85,10 @@ void Nepomuk::AnnotationWidget::Private::_k_slotAnnotationsChanged() { + m_sortModel->sort(0, Qt::DescendingOrder); if ( !navigationPerformed ) m_annotationsView->selectionModel()->select( m_sortModel->index( 0, 0 ), QItemSelectionModel::Clear|QItemSelectionModel::SelectCurrent ); - m_sortModel->sort(0, Qt::DescendingOrder); }