Skip to content
Permalink
Browse files

[Fix #7784] Browser keeps crashing when navigating the tree

  • Loading branch information
m-kuhn committed May 13, 2013
1 parent b5c540f commit 110b87e6a697da4aaeda8f28f586f34e413934fc
Showing with 10 additions and 5 deletions.
  1. +10 −5 src/gui/attributetable/qgsattributetableview.cpp
@@ -120,11 +120,16 @@ void QgsAttributeTableView::setModel( QgsAttributeTableFilterModel* filterModel
QTableView::setModel( filterModel );

delete mFeatureSelectionModel;
mFeatureSelectionModel = new QgsFeatureSelectionModel( mFilterModel, mFilterModel, mFilterModel->layer(), mFilterModel );
setSelectionModel( mFeatureSelectionModel );
mTableDelegate->setFeatureSelectionModel( mFeatureSelectionModel );
connect( mFeatureSelectionModel, SIGNAL( requestRepaint( QModelIndexList ) ), this, SLOT( repaintRequested( QModelIndexList ) ) );
connect( mFeatureSelectionModel, SIGNAL( requestRepaint() ), this, SLOT( repaintRequested() ) );
mFeatureSelectionModel = NULL;

if ( filterModel )
{
mFeatureSelectionModel = new QgsFeatureSelectionModel( mFilterModel, mFilterModel, mFilterModel->layer(), mFilterModel );
setSelectionModel( mFeatureSelectionModel );
mTableDelegate->setFeatureSelectionModel( mFeatureSelectionModel );
connect( mFeatureSelectionModel, SIGNAL( requestRepaint( QModelIndexList ) ), this, SLOT( repaintRequested( QModelIndexList ) ) );
connect( mFeatureSelectionModel, SIGNAL( requestRepaint() ), this, SLOT( repaintRequested() ) );
}
}

void QgsAttributeTableView::closeEvent( QCloseEvent *e )

0 comments on commit 110b87e

Please sign in to comment.
You can’t perform that action at this time.