Skip to content

Commit

Permalink
Fix crash in attributetable when removing more than one column
Browse files Browse the repository at this point in the history
References #16746
  • Loading branch information
signedav authored and m-kuhn committed Jul 18, 2017
1 parent 7d094b0 commit 02179ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/attributetable/qgsattributetablefiltermodel.cpp
Expand Up @@ -196,7 +196,8 @@ void QgsAttributeTableFilterModel::setAttributeTableConfig( const QgsAttributeTa
{
if ( newColumnMapping.size() == mColumnMapping.size() - removedColumnCount )
{
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn );
//the amount of removed column in the model need to be equal removedColumnCount
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn+removedColumnCount-1 );
mColumnMapping = newColumnMapping;
endRemoveColumns();
}
Expand Down

0 comments on commit 02179ad

Please sign in to comment.