Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix attribute table cannot map index when filtered
  • Loading branch information
m-kuhn committed Jul 7, 2016
1 parent 77fa125 commit 5ae7802
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/attributetable/qgsattributetablefiltermodel.cpp
Expand Up @@ -503,7 +503,11 @@ QModelIndex QgsAttributeTableFilterModel::mapFromSource( const QModelIndex& sour
if ( proxyIndex.column() < 0 )
return QModelIndex();

return index( proxyIndex.row(), mapColumnToSource( proxyIndex.column() ), proxyIndex.parent() );
int col = mapColumnToSource( proxyIndex.column() );
if ( col == -1 )
col = 0;

return index( proxyIndex.row(), col , proxyIndex.parent() );
}

Qt::ItemFlags QgsAttributeTableFilterModel::flags( const QModelIndex& index ) const
Expand Down

0 comments on commit 5ae7802

Please sign in to comment.