Skip to content

Commit

Permalink
Select proper features in filtered feature list
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 16, 2013
1 parent 7f158b8 commit 1208051
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/gui/attributetable/qgsfeaturelistview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void QgsFeatureListView::mousePressEvent( QMouseEvent *event )
{
QPoint pos = event->pos();

QModelIndex index = mModel->mapToMaster( indexAt( pos ) );
QModelIndex index = indexAt( pos );

if ( QgsFeatureListViewDelegate::EditElement == mItemDelegate->positionToElement( event->pos() ) )
{
Expand All @@ -111,6 +111,7 @@ void QgsFeatureListView::mousePressEvent( QMouseEvent *event )
{
mFeatureSelectionModel->enableSync( false );
selectRow( index, true );
repaintRequested();
}
}

Expand Down Expand Up @@ -176,7 +177,7 @@ void QgsFeatureListView::mouseMoveEvent( QMouseEvent *event )
{
QPoint pos = event->pos();

QModelIndex index = mModel->mapToMaster( indexAt( pos ) );
QModelIndex index = indexAt( pos );

if ( mEditSelectionDrag )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsfeatureselectionmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bool QgsFeatureSelectionModel::isSelected( QgsFeatureId fid )
if ( mDeselectedBuffer.contains( fid ) )
return false;

if ( mLayer->selectedFeaturesIds().contains( fid ) )
if ( !mClearAndSelectBuffer && mLayer->selectedFeaturesIds().contains( fid ) )
return true;

return false;
Expand Down

0 comments on commit 1208051

Please sign in to comment.