From 5da8a9861ec264878785d9acb9542eec9e46d5b2 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 10 Sep 2007 09:39:03 +0000 Subject: [PATCH] invalidate the page filter proxy model less times svn path=/trunk/KDE/kdegraphics/okular/; revision=710549 --- ui/annotationproxymodels.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/annotationproxymodels.cpp b/ui/annotationproxymodels.cpp index a3020314d..5dc84da34 100644 --- a/ui/annotationproxymodels.cpp +++ b/ui/annotationproxymodels.cpp @@ -32,8 +32,6 @@ void PageFilterProxyModel::groupByCurrentPage( bool value ) mGroupByCurrentPage = value; invalidateFilter(); - - emit layoutChanged(); } void PageFilterProxyModel::setCurrentPage( int page ) @@ -43,9 +41,11 @@ void PageFilterProxyModel::setCurrentPage( int page ) mCurrentPage = page; - invalidateFilter(); + // no need to invalidate when we're not showing the current page only + if ( !mGroupByCurrentPage ) + return; - emit layoutChanged(); + invalidateFilter(); } bool PageFilterProxyModel::filterAcceptsRow( int row, const QModelIndex &sourceParent ) const