From bea23d7dbed87366828a0c441ea2e97d0f94b742 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 28 May 2012 14:18:51 +0200 Subject: [PATCH] * Don't emit selection requests if we didn't activate a ViewPage. --- src/sourcetree/SourcesModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sourcetree/SourcesModel.cpp b/src/sourcetree/SourcesModel.cpp index e0934a368..3a56eded8 100644 --- a/src/sourcetree/SourcesModel.cpp +++ b/src/sourcetree/SourcesModel.cpp @@ -549,7 +549,7 @@ SourcesModel::linkSourceItemToPage( SourceTreeItem* item, ViewPage* p ) // TODO handle removal m_sourceTreeLinks[ p ] = item; - if( m_viewPageDelayedCacheItem == p ) + if ( p && m_viewPageDelayedCacheItem == p ) emit selectRequest( QPersistentModelIndex( indexFromItem( item ) ) ); if ( QObject* obj = dynamic_cast< QObject* >( p ) )